|
wavelength 1.0.0
|


Go to the source code of this file.
Classes | |
| struct | Triangle |
| Triangle stored as a corner, the two edges leaving it, and its normal. More... | |
Enumerations | |
| enum | CullMode { kCullClockwise = 0 , kCullCounterClockwise = 1 , kCullNone = 2 } |
| The faces a segment test against a triangle discards by winding. More... | |
Functions | |
| PrnStream & | operator<< (PrnStream &stream, CullMode nMode) |
| Write the label of a cull mode. | |
| bool | IntersectSegmentTriangle (const Segment &segment, const Triangle &triangle, CullMode nCull, float *pflT) |
| Report whether a segment passes through a triangle. | |
| enum CullMode |
The faces a segment test against a triangle discards by winding.
The name is inferred. The text writer labels the values "CW", "CCW", and "No".
| Enumerator | |
|---|---|
| kCullClockwise | Discard faces whose normal points along the segment. |
| kCullCounterClockwise | Discard faces whose normal points against the segment. |
| kCullNone | Test both windings. |
Write the label of a cull mode.
A value outside CullMode writes nothing.
| stream | The stream to write to. |
| nMode | The mode. |
| bool IntersectSegmentTriangle | ( | const Segment & | segment, |
| const Triangle & | triangle, | ||
| CullMode | nCull, | ||
| float * | pflT ) |
Report whether a segment passes through a triangle.
The point where the line meets the triangle's plane is projected onto the first coordinate plane, of xy, xz, and yz, in which the edges are not parallel.
| segment | The segment. |
| triangle | The triangle. |
| nCull | The windings to discard. |
| pflT | Receives the parameter of the point where the line meets the plane, 0 at the start and 1 at the end. A face discarded by winding leaves it unchanged. |