Pyrogenesis
trunk
|
Helper functions related to geometry algorithms. More...
Go to the source code of this file.
Namespaces | |
Geometry | |
Functions | |
bool | Geometry::PointIsInSquare (const CFixedVector2D &point, const CFixedVector2D &u, const CFixedVector2D &v, const CFixedVector2D &halfSize) |
Checks if a point is inside the given rotated rectangle. More... | |
CFixedVector2D | Geometry::GetHalfBoundingBox (const CFixedVector2D &u, const CFixedVector2D &v, const CFixedVector2D &halfSize) |
Returns a vector (bx,by) such that every point inside the given rotated rectangle has coordinates (x,y) with -bx <= x <= bx, -by <= y < by. More... | |
fixed | Geometry::DistanceToSquare (const CFixedVector2D &point, const CFixedVector2D &u, const CFixedVector2D &v, const CFixedVector2D &halfSize, bool countInsideAsZero=false) |
Returns the minimum Euclidean distance from the given point to any point on the boundary of the given rotated rectangle. More... | |
fixed | Geometry::DistanceToSquareSquared (const CFixedVector2D &point, const CFixedVector2D &u, const CFixedVector2D &v, const CFixedVector2D &halfSize, bool countInsideAsZero=false) |
Similar to above but never uses sqrt, so it returns the squared distance. More... | |
CFixedVector2D | Geometry::NearestPointOnSquare (const CFixedVector2D &point, const CFixedVector2D &u, const CFixedVector2D &v, const CFixedVector2D &halfSize) |
Returns a point on the boundary of the given rotated rectangle that is closest (or equally closest) to the given point in Euclidean distance. More... | |
float | Geometry::ChordToCentralAngle (const float chordLength, const float radius) |
Given a circle of radius radius , and a chord of length chordLength on this circle, computes the central angle formed by connecting the chord's endpoints to the center of the circle. More... | |
bool | Geometry::TestRaySquare (const CFixedVector2D &a, const CFixedVector2D &b, const CFixedVector2D &u, const CFixedVector2D &v, const CFixedVector2D &halfSize) |
bool | Geometry::TestRayAASquare (const CFixedVector2D &a, const CFixedVector2D &b, const CFixedVector2D &halfSize) |
bool | Geometry::TestSquareSquare (const CFixedVector2D &c0, const CFixedVector2D &u0, const CFixedVector2D &v0, const CFixedVector2D &halfSize0, const CFixedVector2D &c1, const CFixedVector2D &u1, const CFixedVector2D &v1, const CFixedVector2D &halfSize1) |
Helper functions related to geometry algorithms.