resonance 1.0.1
Loading...
Searching...
No Matches
DurGemCurve Class Reference

Curved durable-gem segment of one lane, drawn as one continuous ribbon. More...

#include <durgemcurve.h>

Collaboration diagram for DurGemCurve:

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

Detailed Description

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.

Constructor & Destructor Documentation

◆ DurGemCurve()

DurGemCurve::DurGemCurve ( )
inline

Construct an empty record with no ribbon.

Only mString is set. The binary has no out-of-line copy.

◆ ~DurGemCurve()

DurGemCurve::~DurGemCurve ( )

Delete the ribbon.

Ghidra address:
NTSC-U/C: 0x004375a8
Ghidra address:
PAL: 0x00473340

Member Function Documentation

◆ Init()

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.

Parameters
pViewThe view that draws the ribbon.
nLaneThe lane the curve follows.
nRowThe slice row of the curve.
pPointsThe nine subdivision points, DurGemTrails::kSegmentPointCount of them.
colorThe colour of every point.
pMatThe material the ribbon draws with.
flWidthThe width of the ribbon.
Ghidra address:
NTSC-U/C: 0x00432cf0
Ghidra address:
PAL: 0x0046ea20

◆ Show()

int DurGemCurve::Show ( )

Show the ribbon.

DurGemTrails::Update() inlines the body.

Returns
The point count of the ribbon.
Ghidra address:
NTSC-U/C: 0x00437610
Ghidra address:
PAL: 0x004733a8

◆ Hide()

void DurGemCurve::Hide ( )

Hide the ribbon.

DurGemTrails::Update() inlines the body.

Ghidra address:
NTSC-U/C: 0x00437670
Ghidra address:
PAL: 0x00473408

◆ FindCrossing()

bool DurGemCurve::FindCrossing ( const Plane & plane,
Vector3 * pOut )

Find where the ribbon crosses plane.

Consecutive points form the segments, and the result of IntersectSegmentWithPlane() decides the crossing. DurGemTrails::Update() inlines the body.

Parameters
planeThe plane to test against.
pOutReceives the crossing point.
Returns
True when a segment crosses plane.
Ghidra address:
NTSC-U/C: 0x004376a0
Ghidra address:
PAL: 0x00473438

Member Data Documentation

◆ mLane

int DurGemCurve::mLane

The lane the curve follows.

◆ mRow

int DurGemCurve::mRow

The slice row of the curve, the list's sort key.

◆ mString

Rnd::String* DurGemCurve::mString

The ribbon, or null before Init().


The documentation for this class was generated from the following file: