OpenBarnyard
 
Loading...
Searching...
No Matches
TLightIDList Struct Reference

#include <TRenderContext.h>

Public Member Functions

void Add (TLightID a_iLightId)
 
void Reset ()
 
TLightIDoperator[] (TINT a_iIndex)
 

Public Attributes

TLightID aIDs [MAX_NUM_LIGHTS]
 

Static Public Attributes

static constexpr TINT MAX_NUM_LIGHTS = 4
 

Detailed Description

Definition at line 14 of file TRenderContext.h.

Member Function Documentation

◆ Add()

void TLightIDList::Add ( TLightID a_iLightId)

Definition at line 374 of file TRenderContext.cpp.

375{
376 for ( TINT i = 0; i < 4; i++ )
377 {
378 if ( aIDs[ i ] == -1 )
379 {
380 aIDs[ i ] = a_iLightId;
381 return;
382 }
383 }
384}
int TINT
Definition Typedefs.h:7
TLightID aIDs[MAX_NUM_LIGHTS]

◆ operator[]()

TLightID & TLightIDList::operator[] ( TINT a_iIndex)

Definition at line 394 of file TRenderContext.cpp.

395{
396 TASSERT( a_iIndex < MAX_NUM_LIGHTS );
397 return aIDs[ a_iIndex ];
398}
#define TASSERT(X,...)
Definition Defines.h:138
static constexpr TINT MAX_NUM_LIGHTS

◆ Reset()

void TLightIDList::Reset ( )

Definition at line 386 of file TRenderContext.cpp.

387{
388 aIDs[ 3 ] = -1;
389 aIDs[ 2 ] = -1;
390 aIDs[ 1 ] = -1;
391 aIDs[ 0 ] = -1;
392}

Member Data Documentation

◆ aIDs

TLightID TLightIDList::aIDs[MAX_NUM_LIGHTS]

Definition at line 23 of file TRenderContext.h.

◆ MAX_NUM_LIGHTS

TINT TLightIDList::MAX_NUM_LIGHTS = 4
inlinestaticconstexpr

Definition at line 16 of file TRenderContext.h.


The documentation for this struct was generated from the following files: