wavelength 1.0.0
Loading...
Searching...
No Matches
TnlGeom::PanelData Class Reference

One built bar of one track, 0xd0 bytes. More...

#include <tnlgeom.h>

Public Member Functions

 PanelData ()
 Construct a white, transparent, unpickable panel with no mesh that needs a rebuild.
 PanelData (PanelData &&)=default
 Take over the mesh and the sections of another panel.
PanelData & operator= (PanelData &&)=default
 Take over the mesh and the sections of another panel.
void Rebuild (const MeshHolder *pSource, const Vector3 *pOffset, int nRows)
 Rebuild the vertices of the mesh from the sections of the panel and a source mesh.
void UpdateTriangles ()
 Rebuild the two triangles of the panel that a pick tests.
bool Hit (const Segment *pSegment) const
 Report whether a segment strikes the panel.
std::vector< CrossSectionXfm > & GetBaseSections ()
const std::vector< CrossSectionXfm > & GetBaseSections () const
std::vector< CrossSectionXfm > & GetSections ()
const std::vector< CrossSectionXfm > & GetSections () const
void SetSection (int nSection, const CrossSectionXfm &section)
 Replace one section as drawn.
void SetSections (const std::vector< CrossSectionXfm > &sections)
RndMesh * GetMesh () const
void SetMesh (std::unique_ptr< RndMesh > pMesh)
 Replace the mesh of the panel.
RndMat * GetCheckpointMat () const
void SetCheckpointMat (RndMat *pMat)
 Set the checkpoint material of the panel.
Color & GetColor ()
const Color & GetColor () const
void SetColor (const Color &color)
 Set the colour of the panel.
char GetHighlighted () const
void SetHighlighted (char bHighlighted)
 Set whether the panel is drawn highlighted.
int GetDirty () const
void SetDirty (int bDirty)
 Set whether the mesh needs Rebuild().
int GetPickable () const
void SetPickable (int bPickable)
 Set whether Hit() tests the panel.
char GetTransparent () const
void SetTransparent (char bTransparent)
 Set whether the panel does not write depth.
char GetStartSection () const
void SetStartSection (char nSection)
 Set the first section Rebuild() moves along.

Detailed Description

One built bar of one track, 0xd0 bytes.

Constructor & Destructor Documentation

◆ PanelData() [1/2]

TnlGeom::PanelData::PanelData ( )

Construct a white, transparent, unpickable panel with no mesh that needs a rebuild.

BuildPanels() inlines it.

◆ PanelData() [2/2]

TnlGeom::PanelData::PanelData ( PanelData && )
default

Take over the mesh and the sections of another panel.

Member Function Documentation

◆ operator=()

PanelData & TnlGeom::PanelData::operator= ( PanelData && )
default

Take over the mesh and the sections of another panel.

◆ Rebuild()

void TnlGeom::PanelData::Rebuild ( const MeshHolder * pSource,
const Vector3 * pOffset,
int nRows )

Rebuild the vertices of the mesh from the sections of the panel and a source mesh.

Each row of four vertices takes the section of its index, and the rows before mStartSection all take that section.

Parameters
pSourceThe mesh whose vertices are placed.
pOffsetThe offset added to each source vertex first.
nRowsThe rows of vertices.
Ghidra address:
NTSC-U/C: 0x001d2940
Ghidra address:
PAL: 0x001db6e0

◆ UpdateTriangles()

void TnlGeom::PanelData::UpdateTriangles ( )

Rebuild the two triangles of the panel that a pick tests.

Ghidra address:
NTSC-U/C: 0x001d2aa8
Ghidra address:
PAL: 0x001db848

◆ Hit()

bool TnlGeom::PanelData::Hit ( const Segment * pSegment) const

Report whether a segment strikes the panel.

Parameters
pSegmentThe segment.
Returns
Whether picks test the panel and the segment strikes either triangle.
Ghidra address:
NTSC-U/C: 0x001d2cf0
Ghidra address:
PAL: 0x001dba90

◆ GetBaseSections() [1/2]

std::vector< CrossSectionXfm > & TnlGeom::PanelData::GetBaseSections ( )
inline
Returns
The sections as the bar was built.

◆ GetBaseSections() [2/2]

const std::vector< CrossSectionXfm > & TnlGeom::PanelData::GetBaseSections ( ) const
inline
Returns
The sections as the bar was built.

◆ GetSections() [1/2]

std::vector< CrossSectionXfm > & TnlGeom::PanelData::GetSections ( )
inline
Returns
The sections as drawn, possibly bent.

◆ GetSections() [2/2]

const std::vector< CrossSectionXfm > & TnlGeom::PanelData::GetSections ( ) const
inline
Returns
The sections as drawn, possibly bent.

◆ SetSection()

void TnlGeom::PanelData::SetSection ( int nSection,
const CrossSectionXfm & section )
inline

Replace one section as drawn.

Parameters
nSectionThe section.
sectionThe section.

◆ SetSections()

void TnlGeom::PanelData::SetSections ( const std::vector< CrossSectionXfm > & sections)
inline
Parameters
sectionsThe sections as drawn.

◆ GetMesh()

RndMesh * TnlGeom::PanelData::GetMesh ( ) const
inline
Returns
The mesh of the panel.

◆ SetMesh()

void TnlGeom::PanelData::SetMesh ( std::unique_ptr< RndMesh > pMesh)
inline

Replace the mesh of the panel.

Parameters
pMeshThe new mesh.

◆ GetCheckpointMat()

RndMat * TnlGeom::PanelData::GetCheckpointMat ( ) const
inline
Returns
The checkpoint material of the panel, or null.

◆ SetCheckpointMat()

void TnlGeom::PanelData::SetCheckpointMat ( RndMat * pMat)
inline

Set the checkpoint material of the panel.

Parameters
pMatThe material, or null.

◆ GetColor() [1/2]

Color & TnlGeom::PanelData::GetColor ( )
inline
Returns
The colour of the panel.

◆ GetColor() [2/2]

const Color & TnlGeom::PanelData::GetColor ( ) const
inline
Returns
The colour of the panel.

◆ SetColor()

void TnlGeom::PanelData::SetColor ( const Color & color)
inline

Set the colour of the panel.

Parameters
colorThe colour.

◆ GetHighlighted()

char TnlGeom::PanelData::GetHighlighted ( ) const
inline
Returns
Whether the panel is drawn highlighted.

◆ SetHighlighted()

void TnlGeom::PanelData::SetHighlighted ( char bHighlighted)
inline

Set whether the panel is drawn highlighted.

Parameters
bHighlightedWhether it is highlighted.

◆ GetDirty()

int TnlGeom::PanelData::GetDirty ( ) const
inline
Returns
Whether the mesh needs Rebuild().

◆ SetDirty()

void TnlGeom::PanelData::SetDirty ( int bDirty)
inline

Set whether the mesh needs Rebuild().

Parameters
bDirtyWhether it needs a rebuild.

◆ GetPickable()

int TnlGeom::PanelData::GetPickable ( ) const
inline
Returns
Whether Hit() tests the panel.

◆ SetPickable()

void TnlGeom::PanelData::SetPickable ( int bPickable)
inline

Set whether Hit() tests the panel.

Parameters
bPickableWhether picks test it.

◆ GetTransparent()

char TnlGeom::PanelData::GetTransparent ( ) const
inline
Returns
Whether the panel does not write depth.

◆ SetTransparent()

void TnlGeom::PanelData::SetTransparent ( char bTransparent)
inline

Set whether the panel does not write depth.

Parameters
bTransparentWhether it is transparent.

◆ GetStartSection()

char TnlGeom::PanelData::GetStartSection ( ) const
inline
Returns
The first section Rebuild() moves along.

◆ SetStartSection()

void TnlGeom::PanelData::SetStartSection ( char nSection)
inline

Set the first section Rebuild() moves along.

Parameters
nSectionThe section.

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