18 #ifndef INCLUDED_HELPER_GEOMETRY
19 #define INCLUDED_HELPER_GEOMETRY
90 #endif // INCLUDED_HELPER_GEOMETRY
A simple fixed-point number class.
CFixedVector2D NearestPointOnSquare(CFixedVector2D point, CFixedVector2D u, CFixedVector2D v, CFixedVector2D halfSize)
Find point closest to the given point on the edge of the given square or rectangle.
bool TestRayAASquare(CFixedVector2D a, CFixedVector2D b, CFixedVector2D halfSize)
bool TestRaySquare(CFixedVector2D a, CFixedVector2D b, CFixedVector2D u, CFixedVector2D v, CFixedVector2D halfSize)
bool TestSquareSquare(CFixedVector2D c0, CFixedVector2D u0, CFixedVector2D v0, CFixedVector2D halfSize0, CFixedVector2D c1, CFixedVector2D u1, CFixedVector2D v1, CFixedVector2D halfSize1)
fixed DistanceToSquare(CFixedVector2D point, CFixedVector2D u, CFixedVector2D v, CFixedVector2D halfSize)
float 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.
bool PointIsInSquare(CFixedVector2D point, CFixedVector2D u, CFixedVector2D v, CFixedVector2D halfSize)
Checks if a point is inside the given rotated square or rectangle.
CFixedVector2D GetHalfBoundingBox(CFixedVector2D u, CFixedVector2D v, CFixedVector2D halfSize)