|
resonance 1.0.1
|
Straight segments of one lane of one tunnel slice, drawn as line pairs of one ribbon. More...
#include <durgemrowstring.h>

Public Member Functions | |
| DurGemRowString (int nLane, Rnd::Mat *pMat, Rnd::View *pView, float flWidth) | |
| Create the ribbon, set it to draw line pairs, and add it to pView. | |
| ~DurGemRowString () | |
| Delete the ribbon. | |
| void | AddLine (const Color &color, float flStartFrame, float flStartBlend, float flEndFrame, float flEndBlend) |
| Append one straight segment in color between two tunnel positions. | |
| void | Clear () |
| Discard the segments and hide the ribbon. | |
| int | Show (int nRow) |
| Show the ribbon when it belongs to slice row nRow and hide it otherwise. | |
| void | Hide () |
| Hide the ribbon without discarding the segments. | |
| bool | FindCrossing (const Plane &plane, Vector3 *pOut) |
| Find where a segment crosses plane. | |
Public Attributes | |
| Rnd::String * | mString |
| int | mLane |
| int | mRow |
| int | mCount |
Straight segments of one lane of one tunnel slice, drawn as line pairs of one 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 durable-gem trails that allocate it and from the one lane and slice row it draws. DurGemTrails allocates one per lane per row with the untagged scalar allocator (0x10 bytes) and indexes them by row and then by lane.
Every member is public because DurGemTrails reads mString directly in AddSegment(), StartStrip(), and Update().
Create the ribbon, set it to draw line pairs, and add it to pView.
The ribbon takes the next DurGemTrails::NewStringName() name. mRow starts at -100.
| nLane | The lane the segments follow. |
| pMat | The material the ribbon draws with. |
| pView | The view that draws the ribbon. |
| flWidth | The width of the ribbon. |
| DurGemRowString::~DurGemRowString | ( | ) |
Delete the ribbon.
The destructor of DurGemTrails inlines it. The out-of-line copy is the deleting form, which frees the object only when bit 0 of the flag is set, and it has no caller. Its place at the head of this unit, ahead of AddLine(), is what assigns it to this class rather than to DurGemStrip, whose destructor has the same body.
| void DurGemRowString::AddLine | ( | const Color & | color, |
| float | flStartFrame, | ||
| float | flStartBlend, | ||
| float | flEndFrame, | ||
| float | flEndBlend ) |
Append one straight segment in color between two tunnel positions.
A segment whose start frame falls in another slice row than mRow first moves the string to that row and discards its segments. DurGemTrails::AddSegment() inlines the body.
| color | The colour of both ends. |
| flStartFrame | The tunnel frame of the start. |
| flStartBlend | The position across the lane at the start. |
| flEndFrame | The tunnel frame of the end. |
| flEndBlend | The position across the lane at the end. |
| void DurGemRowString::Clear | ( | ) |
Discard the segments and hide the ribbon.
mRow becomes -1000. DurGemTrails::EndTrail() inlines the body.
| int DurGemRowString::Show | ( | int | nRow | ) |
Show the ribbon when it belongs to slice row nRow and hide it otherwise.
DurGemTrails::Update() inlines the body.
| nRow | The slice row being drawn. |
| void DurGemRowString::Hide | ( | ) |
Hide the ribbon without discarding the segments.
The shipped program does not call it. The byte-identical routine at 0x0042a9e8, in the head-up display unit, is recorded as a copy of this one, because nothing there identifies another class it could belong to. The title is inferred.
Find where a segment crosses plane.
Only a crossing between the two ends of a segment counts. DurGemTrails::Update() inlines the body.
| plane | The plane to test against. |
| pOut | Receives the crossing point. |
| Rnd::String* DurGemRowString::mString |
The ribbon.
| int DurGemRowString::mLane |
The lane the segments follow.
| int DurGemRowString::mRow |
The slice row of the segments, -100 before the first.
| int DurGemRowString::mCount |
The number of segments, two ribbon points each.