|
resonance 1.0.1
|
Curved durable-gem segment of one lane, drawn as one continuous ribbon. More...
#include <durgemcurve.h>

Public Member Functions | |
| DurGemCurve () | |
| Construct an empty record with no ribbon. | |
| ~DurGemCurve () | |
| Delete the ribbon. | |
| void | Init (Rnd::View *pView, int nLane, int nRow, const Vector3 *pPoints, const Color &color, Rnd::Mat *pMat, float flWidth) |
| Create the ribbon through the set points of pPoints and add it to pView hidden. | |
| int | Show () |
| Show the ribbon. | |
| void | Hide () |
| Hide the ribbon. | |
| bool | FindCrossing (const Plane &plane, Vector3 *pOut) |
| Find where the ribbon crosses plane. | |
Public Attributes | |
| int | mLane |
| int | mRow |
| Rnd::String * | mString |
Curved durable-gem segment of one lane, drawn as one continuous ribbon.
The class is not polymorphic and emits no RTTI. No descriptor, tag, or file path identifies it, and its name is inferred from the curved path it draws. DurGemTrails stores the records by value in a list sorted by mRow, the 0xc-byte value of a 0x18-byte list node.
The copy is the compiler's member-wise copy. DurGemTrails::AddSegment() inserts a default record and then calls Init() on the copy in the list.
|
inline |
Construct an empty record with no ribbon.
Only mString is set. The binary has no out-of-line copy.
| DurGemCurve::~DurGemCurve | ( | ) |
Delete the ribbon.
| void DurGemCurve::Init | ( | Rnd::View * | pView, |
| int | nLane, | ||
| int | nRow, | ||
| const Vector3 * | pPoints, | ||
| const Color & | color, | ||
| Rnd::Mat * | pMat, | ||
| float | flWidth ) |
Create the ribbon through the set points of pPoints and add it to pView hidden.
A point at exactly the origin marks a point that subdivision did not need and is skipped.
| pView | The view that draws the ribbon. |
| nLane | The lane the curve follows. |
| nRow | The slice row of the curve. |
| pPoints | The nine subdivision points, DurGemTrails::kSegmentPointCount of them. |
| color | The colour of every point. |
| pMat | The material the ribbon draws with. |
| flWidth | The width of the ribbon. |
| int DurGemCurve::Show | ( | ) |
Show the ribbon.
DurGemTrails::Update() inlines the body.
| void DurGemCurve::Hide | ( | ) |
Hide the ribbon.
DurGemTrails::Update() inlines the body.
Find where the ribbon crosses plane.
Consecutive points form the segments, and the result of IntersectSegmentWithPlane() decides the crossing. DurGemTrails::Update() inlines the body.
| plane | The plane to test against. |
| pOut | Receives the crossing point. |
| int DurGemCurve::mLane |
The lane the curve follows.
| int DurGemCurve::mRow |
The slice row of the curve, the list's sort key.
| Rnd::String* DurGemCurve::mString |
The ribbon, or null before Init().