Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
DecalSystemClass Class Reference

#include <decalsys.h>

Inherited by MultiFixedPoolDecalSystemClass.

Public Member Functions

 DecalSystemClass (void)
 
virtual ~DecalSystemClass (void)
 
virtual DecalGeneratorClassLock_Decal_Generator (void)
 
virtual void Unlock_Decal_Generator (DecalGeneratorClass *generator)
 
virtual void Decal_Mesh_Destroyed (uint32 decal_id, DecalMeshClass *mesh)
 

Protected Member Functions

virtual uint32 Generate_Decal_Id (void)
 

Static Protected Member Functions

static uint32 Generate_Unique_Global_Decal_Id (void)
 

Static Protected Attributes

static uint32 DecalIDGenerator = 0
 

Detailed Description

DecalSystemClass This is a class that manages creation and destruction of decals in the system. It is meant to be over-ridden for game-specific behaviors.

Sample Code: 1 - Create the generator. The system gives it a unique id and gives you a clean decal generator

DecalGeneratorClass * gen = DecalSystem->Lock_Decal_Generator(); gen->Set_Transform(tm); gen->Set_Projection(proj_tm); gen->Set_Bounds(OBBox);

2 - Apply the generator to any objects that you want it to affect. It wont do anything if it does not overlap any polygons in those objects

Scene->Collect_Objects(gen->Get_Bounding_Box(),objectlist); for (iterator.First(objectlist); !iterator.Is_Done(); iterator.Next()) { iterator.Peek_Object()->Create_Decal(gen); }

3 - Release the generator back to the system. At this point, the system may record which meshes actually generated extra decal polygons for future removal. All of this information will be tied together with the unique 'decal ID' that was assigned to the generator.

DecalSystem->Unlock_Decal_Generator(gen);

Definition at line 85 of file decalsys.h.

Constructor & Destructor Documentation

◆ DecalSystemClass()

DecalSystemClass::DecalSystemClass ( void )

Definition at line 76 of file decalsys.cpp.

◆ ~DecalSystemClass()

DecalSystemClass::~DecalSystemClass ( void )
virtual

Definition at line 92 of file decalsys.cpp.

Member Function Documentation

◆ Decal_Mesh_Destroyed()

virtual void DecalSystemClass::Decal_Mesh_Destroyed ( uint32 decal_id,
DecalMeshClass * mesh )
inlinevirtual

Reimplemented in MultiFixedPoolDecalSystemClass.

Definition at line 105 of file decalsys.h.

◆ Generate_Decal_Id()

virtual uint32 DecalSystemClass::Generate_Decal_Id ( void )
inlineprotectedvirtual

Reimplemented in MultiFixedPoolDecalSystemClass.

Definition at line 113 of file decalsys.h.

◆ Generate_Unique_Global_Decal_Id()

uint32 DecalSystemClass::Generate_Unique_Global_Decal_Id ( void )
staticprotected

Definition at line 150 of file decalsys.cpp.

◆ Lock_Decal_Generator()

DecalGeneratorClass * DecalSystemClass::Lock_Decal_Generator ( void )
virtual

Reimplemented in MultiFixedPoolDecalSystemClass.

Definition at line 109 of file decalsys.cpp.

◆ Unlock_Decal_Generator()

void DecalSystemClass::Unlock_Decal_Generator ( DecalGeneratorClass * generator)
virtual

Reimplemented in MultiFixedPoolDecalSystemClass.

Definition at line 131 of file decalsys.cpp.

Member Data Documentation

◆ DecalIDGenerator

uint32 DecalSystemClass::DecalIDGenerator = 0
staticprotected

Definition at line 122 of file decalsys.h.


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