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

The geometry of the tracks of the tunnel, which places a cell of a track in the world. More...

#include <tnlgeom.h>

Classes

struct  CrossSectionXfm
 One cross section of a panel, 0x70 bytes. More...
struct  TrackGeometry
 The flat cross section of one track, 0xa0 bytes. More...
class  MeshHolder
 Owner of a mesh the panels are built from, 4 bytes. More...
class  PanelData
 One built bar of one track, 0xd0 bytes. More...
class  TrackData
 The state of one track, 0x30 bytes. More...
class  Player
 The place of a player in the tunnel, 0x38 bytes. More...

Public Member Functions

 TnlGeom ()
 Construct an empty geometry.
 ~TnlGeom ()
 Destroy the geometry.
void * operator new (size_t nSize)
 Allocate a geometry from the pool, billed to Tunnel.
void operator delete (void *pBlock)
 Release a geometry.
void LoadConfig (DataArray *pConfig, DataArray *pDefaults, int nOption)
 Load the settings of the geometry.
bool Init (const std::vector< std::pair< Vector2, Vector2 > > *pEdges, int nNumBars, int nDetail, int nBarsBehind, float flSlabDepth, float flSlabAngle, RndTransAnim *pPath, const std::vector< Color > *pColors, RndMat *pPanelMat, RndMatAnim *pPanelAnim)
 Set up the tracks from the edges of the cross section, and the passes of the standard panel from a material and an animation of it, then rebuild the meshes and the ring of panels.
void Poll (float flTick, float flDeltaTicks)
 Advance the geometry to a tick, building the bars ahead and moving the players and their activators.
void DrawPanels ()
 Rebuild the dirty panels, then draw the built bars from mBarsBehind before the end of the ring back to the first bar of the song, as the tunnel does in a solo game or outside the Game rule set.
void DrawPanelsMultiplayer ()
 Draw as DrawPanels() does, as the tunnel does in a game of several players with the Game rule set.
void DrawOverlays ()
 Draw the bars of the ring before the song with the bar values, the overlays of the tracks, and the materials of the bars, as the last step of DrawPanels() does, but with each mesh writing depth while it draws.
void BuildBars ()
 Build the bars of the ring that are not built yet.
void BuildBar (int nBar)
 Build the cross sections of one bar on every track along the path, and give the slot of the bar its material.
void ResetPanels ()
 Put every panel back in its first state, white and transparent, and mark every slot of the ring as not built.
void ResetPlayers ()
 Put every player at its track at once.
void SetNumPlayers (int nPlayers)
 Set the number of players, attaching each to the geometry with its index.
void SetMoveLength (float flLength)
 Set the ticks of a move of a player to the next track.
Player * GetPlayer (int nPlayer)
 Report the place of a player.
float MoveLength (float flFrom, float flTo) const
 Report the length of a move between two tracks.
void TrackXfm (int nTrack, Transform *pXfm, bool bSmoothBasis, float flTick, float flLateral)
 Work out the transform of a cell of a track without the offset of the track.
void BlendTrack (Transform *pXfm, bool bSmoothBasis, float flTrack, float flTick, float flLateral)
 Work out the transform of a cell at a fractional track, blending the transforms of the two nearest tracks.
float BuiltEndTick () const
 Report the tick a little before the end of the built bars.
void CellXfm (int nTrack, Transform *pXfm, bool bSmoothBasis, bool bTrackOffset, float flTick, float flLateral)
 Work out the transform of a cell of a track.
void PlaceCell (int nTrack, Transform *pXfm, bool bSmoothBasis, bool bTrackOffset, float flTick, float flLateral, float flRaise)
 Work out the transform of a cell, sunk below the surface of the track.
void BlendCell (Transform *pXfm, bool bSmoothBasis, bool bTrackOffset, float flTrack, float flTick, float flLateral)
 Work out the transform of a cell at a fractional track, blending the two nearest tracks.
void PathXfm (Transform *pXfm, float flTick)
 Work out the transform of the path of the tunnel at a tick.
std::vector< CrossSectionXfm > * GetSections (int nTrack, int nBar, bool bDirty)
 Report the sections of a built panel.
PanelData * GetPanel (int nTrack, int nBar)
 Report a built panel.
void RestoreSections (int nTrack, int nBar)
 Put the sections of a built panel back as the bar was built.
void SetTrackOffset (int nTrack, const Vector3 *pOffset)
 Set the offset of a track, which CellXfm() adds in the basis of the cell.
void SetTrackColor (int nTrack, const Color *pColor)
 Set the colour of the panels of a track.
Color * GetTrackColor (int nTrack)
 Report the colour of the panels of a track.
void SetBarValue (int nBar, RndMat *pMat)
 Set the checkpoint material of a built bar in mBarValues.
void SetPanelState (int nTrack, int nBar, char bTransparent, RndMat *pCheckpointMat, int bPickable, bool bHighlighted, const Color *pColor)
 Set the state of a built panel.
void SetPanelColor (int nTrack, int nBar, const Color *pColor, bool bHighlighted)
 Set the colour of a built panel.
void SetAllPanelColors (const Color *pColor, bool bHighlighted)
 Set the colour of every built panel.
Color * GetPanelColor (int nTrack, int nBar)
 Report the colour of a built panel.
void SetPanelStartSection (int nTrack, int nBar, char nSection)
 Set the first section of a built panel the mesh moves along.
void SetTrackOverlay (int nTrack, RndMat *pMat, int nMode)
 Set the material drawn over a track.
void SetPanelMat (RndMat *pMat, int nKind)
 Set the material of a kind of panel, or the default material.
void BlendPath (RndTransAnim *pAnim, int bLoop, int bUseTime, float flLength, float flStart, float flFrame, float flLoopStart, float flLoopEnd)
 Blend the path to a new animation.
void SetPath (RndTransAnim *pAnim)
 Replace the path at once with an animation that starts at frame 0.
bool Pick (const Segment *pSegment, int *pnTrack, int *pnBar)
 Find the built panel a segment strikes first.
int GetNumBars () const
int GetBarsBehind () const
int GetShowPanels () const
void SetShowPanels (int bShow)
 Set whether the panels show.
float GetBarsPerTick () const
int GetSectionsPerBar () const
int GetFirstBar () const
int GetMinFirstBar () const
void SetMinFirstBar (int nBar)
 Set the least bar Poll() starts the ring at.
int GetEndBar () const
void SetEndBar (int nBar)
 Set the first bar that is never built.
int GetNumTracks () const
const TrackGeometry & GetTrackGeometry (int nTrack) const
 Report the flat cross section of a track.

Static Public Attributes

static constexpr int kRingMask = 7
 Bars of the ring of built panels a bar index selects with its low bits.
static constexpr int kNoBar = 100000000
 The bar a slot of the ring holds when no bar is built in it.

Detailed Description

The geometry of the tracks of the tunnel, which places a cell of a track in the world.

The class is not polymorphic, and the name comes from the RTTI of its nested types. The object is 0x160 bytes. The tunnel is built one bar at a time into a ring of mNumBars panels on each track. A panel is a strip of cross sections placed along the path and drawn through a mesh. A tick with no built panel falls back to the flat cross section of its track carried along the path.

Constructor & Destructor Documentation

◆ TnlGeom()

TnlGeom::TnlGeom ( )

Construct an empty geometry.

Ghidra address:
NTSC-U/C: 0x001cc360
Ghidra address:
PAL: 0x001d5100

◆ ~TnlGeom()

TnlGeom::~TnlGeom ( )

Destroy the geometry.

Ghidra address:
NTSC-U/C: 0x001cc5a8
Ghidra address:
PAL: 0x001d5348

Member Function Documentation

◆ operator new()

void * TnlGeom::operator new ( size_t nSize)
inline

Allocate a geometry from the pool, billed to Tunnel.

Parameters
nSizeThe object size the compiler supplies.
Returns
The block.

◆ operator delete()

void TnlGeom::operator delete ( void * pBlock)
inline

Release a geometry.

Parameters
pBlockThe block.

◆ LoadConfig()

void TnlGeom::LoadConfig ( DataArray * pConfig,
DataArray * pDefaults,
int nOption )

Load the settings of the geometry.

The body is empty.

Parameters
pConfigThe configuration.
pDefaultsThe defaults of the configuration.
nOptionThe fourth argument every loader of the tunnel graphics receives.
Ghidra address:
NTSC-U/C: 0x001ccaa0
Ghidra address:
PAL: 0x001d5840

◆ Init()

bool TnlGeom::Init ( const std::vector< std::pair< Vector2, Vector2 > > * pEdges,
int nNumBars,
int nDetail,
int nBarsBehind,
float flSlabDepth,
float flSlabAngle,
RndTransAnim * pPath,
const std::vector< Color > * pColors,
RndMat * pPanelMat,
RndMatAnim * pPanelAnim )

Set up the tracks from the edges of the cross section, and the passes of the standard panel from a material and an animation of it, then rebuild the meshes and the ring of panels.

Each texture stage of pPanelMat becomes one material tnl std panel mat pass <n>, and each stage of pPanelAnim with transform keys one animation tnl std matanim stage <n> of the material of its pass. A track past the end of pColors takes the last colour.

Parameters
pEdgesThe left and the right edge of each track, X then Z.
nNumBarsThe bars of each track in the ring of built panels.
nDetailOne more than the doublings of the cross sections of a bar.
nBarsBehindThe built bars retained behind the current bar.
flSlabDepthThe depth of a slab under the panels.
flSlabAngleThe angle of the sides of a slab, in radians.
pPathThe animation of the path.
pColorsThe colour of each track.
pPanelMatThe material of the standard panel.
pPanelAnimThe animation of pPanelMat.
Returns
Whether pEdges has a track.
Ghidra address:
NTSC-U/C: 0x001d0658
Ghidra address:
PAL: 0x001d93f8

◆ Poll()

void TnlGeom::Poll ( float flTick,
float flDeltaTicks )

Advance the geometry to a tick, building the bars ahead and moving the players and their activators.

Parameters
flTickThe tick of the song.
flDeltaTicksThe ticks since the last poll.
Ghidra address:
NTSC-U/C: 0x001cdab8
Ghidra address:
PAL: 0x001d6858

◆ DrawPanels()

void TnlGeom::DrawPanels ( )

Rebuild the dirty panels, then draw the built bars from mBarsBehind before the end of the ring back to the first bar of the song, as the tunnel does in a solo game or outside the Game rule set.

Tracks with an overlay mode skip the first three passes. The checkpoint material of each panel draws first. Then each pass of the standard panel draws the opaque panels without a checkpoint, the first pass in the colour of each panel. Last, each track with a player, an overlay, or changed bar values draws its opaque panels with the bar value or the overlay, and a track with a player draws its transparent panels with the material of their bar. The call then sets mAnimateMoves. The title is inferred.

Ghidra address:
NTSC-U/C: 0x001ccaa8
Ghidra address:
PAL: 0x001d5848

◆ DrawPanelsMultiplayer()

void TnlGeom::DrawPanelsMultiplayer ( )

Draw as DrawPanels() does, as the tunnel does in a game of several players with the Game rule set.

The first pass of the standard panel draws without the colour of each panel, and each later pass takes the colour of the panel and the light colour in mPassLightColors for whether the panel is highlighted. The title is inferred.

Ghidra address:
NTSC-U/C: 0x001ccfa8
Ghidra address:
PAL: 0x001d5d48

◆ DrawOverlays()

void TnlGeom::DrawOverlays ( )

Draw the bars of the ring before the song with the bar values, the overlays of the tracks, and the materials of the bars, as the last step of DrawPanels() does, but with each mesh writing depth while it draws.

The title is inferred.

Ghidra address:
NTSC-U/C: 0x001cd4d0
Ghidra address:
PAL: 0x001d6270

◆ BuildBars()

void TnlGeom::BuildBars ( )

Build the bars of the ring that are not built yet.

Bars at or after mEndBar are marked as not built. While mAnimateMoves is set, the call stops after the first bar it builds.

Ghidra address:
NTSC-U/C: 0x001d0020
Ghidra address:
PAL: 0x001d8dc0

◆ BuildBar()

void TnlGeom::BuildBar ( int nBar)

Build the cross sections of one bar on every track along the path, and give the slot of the bar its material.

A bar before the song takes the kind of panel counted back from the last kind, and every other bar takes the default material. The last section of each panel starts the panel as transparent, not pickable, unhighlighted, and in the colour of its track.

Parameters
nBarThe bar.
Ghidra address:
NTSC-U/C: 0x001d0100
Ghidra address:
PAL: 0x001d8ea0

◆ ResetPanels()

void TnlGeom::ResetPanels ( )

Put every panel back in its first state, white and transparent, and mark every slot of the ring as not built.

Ghidra address:
NTSC-U/C: 0x001d0548
Ghidra address:
PAL: 0x001d92e8

◆ ResetPlayers()

void TnlGeom::ResetPlayers ( )

Put every player at its track at once.

Ghidra address:
NTSC-U/C: 0x001d0600
Ghidra address:
PAL: 0x001d93a0

◆ SetNumPlayers()

void TnlGeom::SetNumPlayers ( int nPlayers)

Set the number of players, attaching each to the geometry with its index.

Parameters
nPlayersThe number of players.
Ghidra address:
NTSC-U/C: 0x001d1290
Ghidra address:
PAL: 0x001da030

◆ SetMoveLength()

void TnlGeom::SetMoveLength ( float flLength)

Set the ticks of a move of a player to the next track.

Parameters
flLengthThe ticks.
Ghidra address:
NTSC-U/C: 0x001d1430
Ghidra address:
PAL: 0x001da1d0

◆ GetPlayer()

Player * TnlGeom::GetPlayer ( int nPlayer)

Report the place of a player.

Parameters
nPlayerThe player.
Returns
The place, or null for a player out of range.
Ghidra address:
NTSC-U/C: 0x001d13f0
Ghidra address:
PAL: 0x001da190

◆ MoveLength()

float TnlGeom::MoveLength ( float flFrom,
float flTo ) const

Report the length of a move between two tracks.

Parameters
flFromThe track the move starts at.
flToThe track the move ends at.
Returns
The length in ticks.
Ghidra address:
NTSC-U/C: 0x001d1438
Ghidra address:
PAL: 0x001da1d8

◆ TrackXfm()

void TnlGeom::TrackXfm ( int nTrack,
Transform * pXfm,
bool bSmoothBasis,
float flTick,
float flLateral )

Work out the transform of a cell of a track without the offset of the track.

Parameters
nTrackThe track.
pXfmReceives the transform.
bSmoothBasisBlend the basis between the two nearest cross sections.
flTickThe tick along the track.
flLateralThe position across the track, from 0 to 1.
Ghidra address:
NTSC-U/C: 0x001d1488
Ghidra address:
PAL: 0x001da228

◆ BlendTrack()

void TnlGeom::BlendTrack ( Transform * pXfm,
bool bSmoothBasis,
float flTrack,
float flTick,
float flLateral )

Work out the transform of a cell at a fractional track, blending the transforms of the two nearest tracks.

Parameters
pXfmReceives the transform.
bSmoothBasisBlend the basis between the two nearest cross sections.
flTrackThe track, which may lie between two tracks and wraps around the tunnel.
flTickThe tick along the track.
flLateralThe position across the track, from 0 to 1.
Ghidra address:
NTSC-U/C: 0x001d18c0
Ghidra address:
PAL: 0x001da660

◆ BuiltEndTick()

float TnlGeom::BuiltEndTick ( ) const

Report the tick a little before the end of the built bars.

Returns
The tick.
Ghidra address:
NTSC-U/C: 0x001d1af8
Ghidra address:
PAL: 0x001da898

◆ CellXfm()

void TnlGeom::CellXfm ( int nTrack,
Transform * pXfm,
bool bSmoothBasis,
bool bTrackOffset,
float flTick,
float flLateral )

Work out the transform of a cell of a track.

The X axis runs across the track and the Z axis away from its surface.

Parameters
nTrackThe track.
pXfmReceives the transform.
bSmoothBasisBlend the basis between the two nearest cross sections.
bTrackOffsetAdd the offset of the track to the position.
flTickThe tick along the track.
flLateralThe position across the track, from 0 to 1.
Ghidra address:
NTSC-U/C: 0x001d1b28
Ghidra address:
PAL: 0x001da8c8

◆ PlaceCell()

void TnlGeom::PlaceCell ( int nTrack,
Transform * pXfm,
bool bSmoothBasis,
bool bTrackOffset,
float flTick,
float flLateral,
float flRaise )

Work out the transform of a cell, sunk below the surface of the track.

The position moves along the Z axis by one less flRaise.

Parameters
nTrackThe track.
pXfmReceives the transform.
bSmoothBasisBlend the basis between the two nearest cross sections.
bTrackOffsetAdd the offset of the track to the position.
flTickThe tick along the track.
flLateralThe position across the track, from 0 to 1.
flRaiseThe height above the track, where 1 is the surface.
Ghidra address:
NTSC-U/C: 0x001d2040
Ghidra address:
PAL: 0x001dade0

◆ BlendCell()

void TnlGeom::BlendCell ( Transform * pXfm,
bool bSmoothBasis,
bool bTrackOffset,
float flTrack,
float flTick,
float flLateral )

Work out the transform of a cell at a fractional track, blending the two nearest tracks.

Parameters
pXfmReceives the transform.
bSmoothBasisBlend the basis between the two nearest cross sections.
bTrackOffsetAdd the offset of the track to the position.
flTrackThe track, which may lie between two tracks and wraps around the tunnel.
flTickThe tick along the track.
flLateralThe position across the track, from 0 to 1.
Ghidra address:
NTSC-U/C: 0x001d20d0
Ghidra address:
PAL: 0x001dae70

◆ PathXfm()

void TnlGeom::PathXfm ( Transform * pXfm,
float flTick )

Work out the transform of the path of the tunnel at a tick.

A tunnel without a path animation gives the identity.

Parameters
pXfmReceives the transform.
flTickThe tick.
Ghidra address:
NTSC-U/C: 0x001d2320
Ghidra address:
PAL: 0x001db0c0

◆ GetSections()

std::vector< CrossSectionXfm > * TnlGeom::GetSections ( int nTrack,
int nBar,
bool bDirty )

Report the sections of a built panel.

Parameters
nTrackThe track.
nBarThe bar.
bDirtyMark the panel to be rebuilt.
Returns
The sections, or null for a bar that is not built.
Ghidra address:
NTSC-U/C: 0x001d2398
Ghidra address:
PAL: 0x001db138

◆ GetPanel()

PanelData * TnlGeom::GetPanel ( int nTrack,
int nBar )

Report a built panel.

Parameters
nTrackThe track.
nBarThe bar.
Returns
The panel, or null for a bar that is not built.
Ghidra address:
NTSC-U/C: 0x001d23d8
Ghidra address:
PAL: 0x001db178

◆ RestoreSections()

void TnlGeom::RestoreSections ( int nTrack,
int nBar )

Put the sections of a built panel back as the bar was built.

Parameters
nTrackThe track.
nBarThe bar.
Ghidra address:
NTSC-U/C: 0x001d23f8
Ghidra address:
PAL: 0x001db198

◆ SetTrackOffset()

void TnlGeom::SetTrackOffset ( int nTrack,
const Vector3 * pOffset )

Set the offset of a track, which CellXfm() adds in the basis of the cell.

Parameters
nTrackThe track.
pOffsetThe offset.
Ghidra address:
NTSC-U/C: 0x001d2498
Ghidra address:
PAL: 0x001db238

◆ SetTrackColor()

void TnlGeom::SetTrackColor ( int nTrack,
const Color * pColor )

Set the colour of the panels of a track.

Parameters
nTrackThe track.
pColorThe colour.
Ghidra address:
NTSC-U/C: 0x001d2568
Ghidra address:
PAL: 0x001db308

◆ GetTrackColor()

Color * TnlGeom::GetTrackColor ( int nTrack)

Report the colour of the panels of a track.

Parameters
nTrackThe track.
Returns
The colour.
Ghidra address:
NTSC-U/C: 0x001d2588
Ghidra address:
PAL: 0x001db328

◆ SetBarValue()

void TnlGeom::SetBarValue ( int nBar,
RndMat * pMat )

Set the checkpoint material of a built bar in mBarValues.

Parameters
nBarThe bar.
pMatThe checkpoint material, or null.
Ghidra address:
NTSC-U/C: 0x001d25a0
Ghidra address:
PAL: 0x001db340

◆ SetPanelState()

void TnlGeom::SetPanelState ( int nTrack,
int nBar,
char bTransparent,
RndMat * pCheckpointMat,
int bPickable,
bool bHighlighted,
const Color * pColor )

Set the state of a built panel.

Parameters
nTrackThe track.
nBarThe bar.
bTransparentWhether the panel does not write depth.
pCheckpointMatThe checkpoint material of the panel, or null.
bPickableWhether picks test the panel.
bHighlightedWhether the panel is drawn highlighted.
pColorThe colour, or null to retain the colour.
Ghidra address:
NTSC-U/C: 0x001d25e0
Ghidra address:
PAL: 0x001db380

◆ SetPanelColor()

void TnlGeom::SetPanelColor ( int nTrack,
int nBar,
const Color * pColor,
bool bHighlighted )

Set the colour of a built panel.

Parameters
nTrackThe track.
nBarThe bar.
pColorThe colour, or null to retain the colour.
bHighlightedWhether the panel is drawn highlighted.
Ghidra address:
NTSC-U/C: 0x001d26a0
Ghidra address:
PAL: 0x001db440

◆ SetAllPanelColors()

void TnlGeom::SetAllPanelColors ( const Color * pColor,
bool bHighlighted )

Set the colour of every built panel.

Parameters
pColorThe colour, or null for the colour of the track of each panel.
bHighlightedWhether the panels are drawn highlighted.
Ghidra address:
NTSC-U/C: 0x001d2700
Ghidra address:
PAL: 0x001db4a0

◆ GetPanelColor()

Color * TnlGeom::GetPanelColor ( int nTrack,
int nBar )

Report the colour of a built panel.

Parameters
nTrackThe track.
nBarThe bar.
Returns
The colour, or null for a bar that is not built.
Ghidra address:
NTSC-U/C: 0x001d27e0
Ghidra address:
PAL: 0x001db580

◆ SetPanelStartSection()

void TnlGeom::SetPanelStartSection ( int nTrack,
int nBar,
char nSection )

Set the first section of a built panel the mesh moves along.

Parameters
nTrackThe track.
nBarThe bar.
nSectionThe section.
Ghidra address:
NTSC-U/C: 0x001d2808
Ghidra address:
PAL: 0x001db5a8

◆ SetTrackOverlay()

void TnlGeom::SetTrackOverlay ( int nTrack,
RndMat * pMat,
int nMode )

Set the material drawn over a track.

Parameters
nTrackThe track.
pMatThe material, or null.
nModeHow the overlay is drawn.
Ghidra address:
NTSC-U/C: 0x001d2848
Ghidra address:
PAL: 0x001db5e8

◆ SetPanelMat()

void TnlGeom::SetPanelMat ( RndMat * pMat,
int nKind )

Set the material of a kind of panel, or the default material.

Parameters
pMatThe material.
nKindThe kind, or an index below kDefaultMatThreshold for the default material.
Ghidra address:
NTSC-U/C: 0x001d2868
Ghidra address:
PAL: 0x001db608

◆ BlendPath()

void TnlGeom::BlendPath ( RndTransAnim * pAnim,
int bLoop,
int bUseTime,
float flLength,
float flStart,
float flFrame,
float flLoopStart,
float flLoopEnd )

Blend the path to a new animation.

Parameters
pAnimThe new animation.
bLoopWhether the new animation loops.
bUseTimeWhether the frame of the new animation follows the time.
flLengthThe length of the blend in ticks.
flStartThe tick the blend starts at.
flFrameThe frame of the new animation at flStart.
flLoopStartThe first frame of the loop of the new animation.
flLoopEndThe frame the loop of the new animation wraps at.
Ghidra address:
NTSC-U/C: 0x001d3498
Ghidra address:
PAL: 0x001dc238

◆ SetPath()

void TnlGeom::SetPath ( RndTransAnim * pAnim)

Replace the path at once with an animation that starts at frame 0.

Parameters
pAnimThe animation, or null for no path.
Ghidra address:
NTSC-U/C: 0x001d34b8
Ghidra address:
PAL: 0x001dc258

◆ Pick()

bool TnlGeom::Pick ( const Segment * pSegment,
int * pnTrack,
int * pnBar )

Find the built panel a segment strikes first.

Parameters
pSegmentThe segment.
pnTrackReceives the track of the panel.
pnBarReceives the bar of the panel.
Returns
Whether a panel was struck.
Ghidra address:
NTSC-U/C: 0x001cd6e0
Ghidra address:
PAL: 0x001d6480

◆ GetNumBars()

int TnlGeom::GetNumBars ( ) const
inline
Returns
The bars of each track in the ring of built panels.

◆ GetBarsBehind()

int TnlGeom::GetBarsBehind ( ) const
inline
Returns
The built bars retained behind the current bar.

◆ GetShowPanels()

int TnlGeom::GetShowPanels ( ) const
inline
Returns
Whether the panels show.

◆ SetShowPanels()

void TnlGeom::SetShowPanels ( int bShow)
inline

Set whether the panels show.

Parameters
bShowWhether they show.

◆ GetBarsPerTick()

float TnlGeom::GetBarsPerTick ( ) const
inline
Returns
The reciprocal of the ticks of one bar.

◆ GetSectionsPerBar()

int TnlGeom::GetSectionsPerBar ( ) const
inline
Returns
The cross sections of one bar.

◆ GetFirstBar()

int TnlGeom::GetFirstBar ( ) const
inline
Returns
The first bar of the ring.

◆ GetMinFirstBar()

int TnlGeom::GetMinFirstBar ( ) const
inline
Returns
The least bar Poll() starts the ring at.

◆ SetMinFirstBar()

void TnlGeom::SetMinFirstBar ( int nBar)
inline

Set the least bar Poll() starts the ring at.

Parameters
nBarThe bar.

◆ GetEndBar()

int TnlGeom::GetEndBar ( ) const
inline
Returns
The first bar that is never built.

◆ SetEndBar()

void TnlGeom::SetEndBar ( int nBar)
inline

Set the first bar that is never built.

Parameters
nBarThe bar.

◆ GetNumTracks()

int TnlGeom::GetNumTracks ( ) const
inline
Returns
The number of tracks.

◆ GetTrackGeometry()

const TrackGeometry & TnlGeom::GetTrackGeometry ( int nTrack) const
inline

Report the flat cross section of a track.

Parameters
nTrackThe track.
Returns
The cross section.

Member Data Documentation

◆ kRingMask

int TnlGeom::kRingMask = 7
staticconstexpr

Bars of the ring of built panels a bar index selects with its low bits.

◆ kNoBar

int TnlGeom::kNoBar = 100000000
staticconstexpr

The bar a slot of the ring holds when no bar is built in it.


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