|
Pyrogenesis
13997
|
Functions | |
| bool | PointIsInSquare (CFixedVector2D point, CFixedVector2D u, CFixedVector2D v, CFixedVector2D halfSize) |
| Checks if a point is inside the given rotated square or rectangle. More... | |
| CFixedVector2D | GetHalfBoundingBox (CFixedVector2D u, CFixedVector2D v, CFixedVector2D halfSize) |
| 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. More... | |
| 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. More... | |
| bool | TestRaySquare (CFixedVector2D a, CFixedVector2D b, CFixedVector2D u, CFixedVector2D v, CFixedVector2D halfSize) |
| bool | TestRayAASquare (CFixedVector2D a, CFixedVector2D b, CFixedVector2D halfSize) |
| bool | TestSquareSquare (CFixedVector2D c0, CFixedVector2D u0, CFixedVector2D v0, CFixedVector2D halfSize0, CFixedVector2D c1, CFixedVector2D u1, CFixedVector2D v1, CFixedVector2D halfSize1) |
| 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.
| radius | Radius of the circle; must be strictly positive. |
Definition at line 48 of file Geometry.cpp.
| fixed Geometry::DistanceToSquare | ( | CFixedVector2D | point, |
| CFixedVector2D | u, | ||
| CFixedVector2D | v, | ||
| CFixedVector2D | halfSize | ||
| ) |
Definition at line 53 of file Geometry.cpp.
| CFixedVector2D Geometry::GetHalfBoundingBox | ( | CFixedVector2D | u, |
| CFixedVector2D | v, | ||
| CFixedVector2D | halfSize | ||
| ) |
Definition at line 40 of file Geometry.cpp.
| CFixedVector2D Geometry::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.
u and v vectors are perpendicular. | point | point vector of the point we want to get the nearest edge point for, relative to the origin (center) of the shape. |
| u | rotated X axis unit vector, relative to the absolute XZ plane. Indicates the orientation of the shape. If not rotated, this value is the absolute X axis unit vector (1,0). If rotated by angle theta, this should be (cos theta, -sin theta). |
| v | rotated Z axis unit vector, relative to the absolute XZ plane. Indicates the orientation of the shape. If not rotated, this value is the absolute Z axis unit vector (0,1). If rotated by angle theta, this should be (sin theta, cos theta). |
| halfSize | Holds half the dimensions of the shape along the u and v vectors, respectively. |
point on the edge of the square specified by orientation unit vectors u and v and half dimensions halfSize, relative to the center of the square Definition at line 119 of file Geometry.cpp.
| bool Geometry::PointIsInSquare | ( | CFixedVector2D | point, |
| CFixedVector2D | u, | ||
| CFixedVector2D | v, | ||
| CFixedVector2D | halfSize | ||
| ) |
Checks if a point is inside the given rotated square or rectangle.
u and v vectors are perpendicular. | point | point vector of the point that is to be tested relative to the origin (center) of the shape. |
| u | rotated X axis unit vector relative to the absolute XZ plane. Indicates the orientation of the rectangle. If not rotated, this value is the absolute X axis unit vector (1,0). If rotated by angle theta, this should be (cos theta, -sin theta), as the absolute Z axis points down in the unit circle. |
| v | rotated Z axis unit vector relative to the absolute XZ plane. Indicates the orientation of the rectangle. If not rotated, this value is the absolute Z axis unit vector (0,1). If rotated by angle theta, this should be (sin theta, cos theta), as the absolute Z axis points down in the unit circle. |
| halfSize | Holds half the dimensions of the shape along the u and v vectors, respectively. |
point is inside the square with rotated X axis unit vector u and rotated Z axis unit vector v, and half dimensions specified by halfSizes. Definition at line 28 of file Geometry.cpp.
| bool Geometry::TestRayAASquare | ( | CFixedVector2D | a, |
| CFixedVector2D | b, | ||
| CFixedVector2D | halfSize | ||
| ) |
Definition at line 241 of file Geometry.cpp.
| bool Geometry::TestRaySquare | ( | CFixedVector2D | a, |
| CFixedVector2D | b, | ||
| CFixedVector2D | u, | ||
| CFixedVector2D | v, | ||
| CFixedVector2D | halfSize | ||
| ) |
Definition at line 193 of file Geometry.cpp.
| bool Geometry::TestSquareSquare | ( | CFixedVector2D | c0, |
| CFixedVector2D | u0, | ||
| CFixedVector2D | v0, | ||
| CFixedVector2D | halfSize0, | ||
| CFixedVector2D | c1, | ||
| CFixedVector2D | u1, | ||
| CFixedVector2D | v1, | ||
| CFixedVector2D | halfSize1 | ||
| ) |
Definition at line 305 of file Geometry.cpp.
1.8.5