|
resonance 1.0.1
|
#include "math/vector3.h"

Go to the source code of this file.
Classes | |
| struct | Plane |
| Plane equation, padded to a PlayStation 2 quadword. More... | |
| struct | Segment |
| Two points that fix a line or a segment. More... | |
Functions | |
| Plane | TransformPlaneToWorld (const Plane &plane, const float *pXfm) |
| Move a plane out of the space a transform is expressed in. | |
| void | InterpolateFourFloats (const float *pFrom, const float *pTo, float *pOut, float flT) |
| Blend four consecutive floats linearly. | |
| bool | IntersectSegmentWithPlane (const Vector3 segment[2], const Plane &plane, float *pT) |
| Find where a segment crosses a plane. | |
| Segment | IntersectPlanes (const Plane &first, const Plane &second) |
| Find the line two planes meet along. | |
| Vector3 | IntersectPlanes (const Plane &first, const Plane &second, const Plane &third) |
| Find the point three planes meet at. | |
Move a plane out of the space a transform is expressed in.
The normal is rotated by the three basis rows on VU0 in macro mode, and the distance becomes the original distance less the dot of the translation row with the rotated normal.
| plane | The plane, in the space the transform maps from. |
| pXfm | The transform, four rows of four floats. |
| void InterpolateFourFloats | ( | const float * | pFrom, |
| const float * | pTo, | ||
| float * | pOut, | ||
| float | flT ) |
Blend four consecutive floats linearly.
Each result is from + (to - from) * flT. TnlCameraRig::SetFrame() blends a camera screen rectangle with it. The title is inferred.
| pFrom | The four values at flT of 0. |
| pTo | The four values at flT of 1. |
| pOut | Receives the four blended values. |
| flT | The blend weight. |
Find where a segment crosses a plane.
The parameter is the signed distance of the start divided by the difference between the signed distances of the start and the end. It is stored whether or not the segment crosses the plane.
| segment | The start and the end of the segment. |
| plane | The plane. |
| pT | Receives the crossing as a fraction of the way from the start to the end. |
Find the line two planes meet along.
The direction is the cross product of the two normals, and the result is a point and that point plus the direction. The point comes from a segment test against pSecond whose start is the first normal scaled by the negated first distance and whose end is the cross product of the direction with the first normal. That end is a direction treated as a position. The point therefore lies on the second plane, and on the first only when the first distance is zero. The title is inferred.
| first | The first plane. |
| second | The second plane. |
Find the point three planes meet at.
The line of the first two planes from IntersectPlanes() is tested against the third, and the point is the one the segment test places at its fraction along that line. The shipped program does not call it. The title is inferred.
| first | The first plane. |
| second | The second plane. |
| third | The third plane. |