OpenBarnyard
 
Loading...
Searching...
No Matches
TMesh Class Reference

#include <TMesh.h>

Inheritance diagram for TMesh:
TObject

Public Types

enum  State_ : State {
  State_None = 0 , State_Created = BITFLAG( 0 ) , State_Validated = BITFLAG( 1 ) , State_Unknown1 = BITFLAG( 2 ) ,
  State_Glow = BITFLAG( 3 )
}
 
enum  FLAG_ : FLAG { FLAG_LOCKED = 0x8000 }
 
using State = TUINT32
 
using FLAG = TUINT32
 
- Public Types inherited from TObject
enum  { IsTObject = TTRUE }
 

Public Member Functions

 TDECLARE_CLASS (TMesh, TObject)
 
 TMesh ()
 
virtual TBOOL Validate ()
 
virtual void Invalidate ()
 
virtual TBOOL Create ()
 
virtual TBOOL Render ()
 
virtual void OnDestroy ()
 
void SetFlags (State a_eFlags, TBOOL a_bEnable)
 
void DestroyResource ()
 
TMaterialGetMaterial () const
 
void SetMaterial (TMaterial *a_pMaterial)
 
TShaderGetOwnerShader ()
 
void SetOwnerShader (TShader *a_pShader)
 
TBOOL IsCreated () const
 
TBOOL IsValidated () const
 
TBOOL IsUnknownState1 () const
 
- Public Member Functions inherited from TObject
virtual Toshi::TClass * GetClass ()
 
virtual void Delete ()
 
virtual ~TObject ()
 
TBOOL IsExactly (TClass *a_pClass)
 
TBOOL IsA (TClass *a_pClass)
 

Protected Member Functions

 ~TMesh ()
 

Protected Attributes

TMaterialm_pMaterial
 
TShaderm_pOwnerShader
 
State m_State
 

Additional Inherited Members

- Static Public Member Functions inherited from TObject
static Toshi::TObject * CreateTObject ()
 
static Toshi::TObject * CreateTObjectInPlace (void *a_pPtr)
 
static void InitialiseClass ()
 
static void DeinitialiseClass ()
 
static TFORCEINLINE TClassGetClassStatic ()
 
- Static Public Attributes inherited from TObject
static constexpr Toshi::TClass * PARENTCLASS = TNULL
 
static constinit Toshi::TClass ms_oClass = Toshi::TClass( "TObject", TObject::CreateTObject, TObject::CreateTObjectInPlace, TObject::InitialiseClass, TObject::DeinitialiseClass, 0, 2, sizeof( TObject ), alignof( TObject ) )
 

Detailed Description

Definition at line 8 of file TMesh.h.

Member Typedef Documentation

◆ FLAG

Definition at line 25 of file TMesh.h.

◆ State

Definition at line 14 of file TMesh.h.

Member Enumeration Documentation

◆ FLAG_

Enumerator
FLAG_LOCKED 

Definition at line 26 of file TMesh.h.

27 {
28 FLAG_LOCKED = 0x8000
29 };
@ FLAG_LOCKED
Definition TMesh.h:28

◆ State_

Enumerator
State_None 
State_Created 
State_Validated 
State_Unknown1 
State_Glow 

Definition at line 15 of file TMesh.h.

16 {
17 State_None = 0,
21 State_Glow = BITFLAG( 3 )
22 };
#define BITFLAG(x)
Definition Defines.h:10
@ State_Glow
Definition TMesh.h:21
@ State_Validated
Definition TMesh.h:19
@ State_None
Definition TMesh.h:17
@ State_Unknown1
Definition TMesh.h:20
@ State_Created
Definition TMesh.h:18

Constructor & Destructor Documentation

◆ TMesh()

TMesh::TMesh ( )

Definition at line 14 of file TMesh.cpp.

15{
19}
#define TNULL
Definition Typedefs.h:23
TShader * m_pOwnerShader
Definition TMesh.h:62
TMaterial * m_pMaterial
Definition TMesh.h:61
State m_State
Definition TMesh.h:63

◆ ~TMesh()

TMesh::~TMesh ( )
protected

Definition at line 21 of file TMesh.cpp.

Member Function Documentation

◆ Create()

TBOOL TMesh::Create ( )
virtual

Definition at line 39 of file TMesh.cpp.

40{
42 return TTRUE;
43}
#define TTRUE
Definition Typedefs.h:25

◆ DestroyResource()

void TMesh::DestroyResource ( )

Definition at line 63 of file TMesh.cpp.

64{
65 Invalidate();
66 OnDestroy();
67 delete this;
68}
virtual void Invalidate()
Definition TMesh.cpp:34
virtual void OnDestroy()
Definition TMesh.cpp:50

◆ GetMaterial()

TMaterial * TMesh::GetMaterial ( ) const

Definition at line 75 of file TMesh.cpp.

76{
77 return m_pMaterial;
78}

◆ GetOwnerShader()

TShader * TMesh::GetOwnerShader ( )

Definition at line 101 of file TMesh.cpp.

102{
103 return m_pOwnerShader;
104}

◆ Invalidate()

void TMesh::Invalidate ( )
virtual

Definition at line 34 of file TMesh.cpp.

35{
37}

◆ IsCreated()

TBOOL TMesh::IsCreated ( ) const

Definition at line 86 of file TMesh.cpp.

87{
88 return m_State & State_Created;
89}

◆ IsUnknownState1()

TBOOL TMesh::IsUnknownState1 ( ) const

Definition at line 96 of file TMesh.cpp.

97{
98 return m_State & State_Unknown1;
99}

◆ IsValidated()

TBOOL TMesh::IsValidated ( ) const

Definition at line 91 of file TMesh.cpp.

92{
93 return m_State & State_Validated;
94}

◆ OnDestroy()

void TMesh::OnDestroy ( )
virtual

Definition at line 50 of file TMesh.cpp.

51{
53}

◆ Render()

TBOOL TMesh::Render ( )
virtual

Definition at line 45 of file TMesh.cpp.

46{
47 return TTRUE;
48}

◆ SetFlags()

void TMesh::SetFlags ( State a_eFlags,
TBOOL a_bEnable )

Definition at line 55 of file TMesh.cpp.

56{
57 if ( a_bEnable )
58 m_State |= a_eFlags;
59 else
60 m_State &= ~a_eFlags;
61}

◆ SetMaterial()

void TMesh::SetMaterial ( TMaterial * a_pMaterial)

Definition at line 70 of file TMesh.cpp.

71{
72 m_pMaterial = pMaterial;
73}

◆ SetOwnerShader()

void TMesh::SetOwnerShader ( TShader * a_pShader)

Definition at line 80 of file TMesh.cpp.

81{
83 m_pOwnerShader = pShader;
84}
#define TASSERT(X,...)
Definition Defines.h:138

◆ TDECLARE_CLASS()

TMesh::TDECLARE_CLASS ( TMesh ,
TObject  )

◆ Validate()

TBOOL TMesh::Validate ( )
virtual

Definition at line 28 of file TMesh.cpp.

29{
31 return TTRUE;
32}

Member Data Documentation

◆ m_pMaterial

TMaterial* TMesh::m_pMaterial
protected

Definition at line 61 of file TMesh.h.

◆ m_pOwnerShader

TShader* TMesh::m_pOwnerShader
protected

Definition at line 62 of file TMesh.h.

◆ m_State

State TMesh::m_State
protected

Definition at line 63 of file TMesh.h.


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