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

#include <renderobjectrecycler.h>

Public Member Functions

void Reset (void)
 
RenderObjClassGet_Render_Object (const char *name, const Matrix3D &tm)
 
void Return_Render_Object (RenderObjClass *obj)
 

Detailed Description

RenderObjectRecyclerClass This class can be used to eliminate dynamic render object allocation. An example usage would be the case where you have a projectile system in a game. Projectiles could be set up to use a variety of render objects and would be rapidly created and destroyed as the players and AI's fire their weapons. If all of your bullet objects request their models from a RenderObjectCache, and return their models to the cache when the bullet is destroyed; the model will get re-used by the next bullet that requests that same model type (highly likely in a game situation).

Public member functions: Reset - release all of the models in the cache. Get_Render_Object - returns either recycles a model or creates a new one through the asset manager Return_Render_Object - give your model back to the recycler for re-use later.

Definition at line 63 of file renderobjectrecycler.h.

Member Function Documentation

◆ Get_Render_Object()

RenderObjClass * RenderObjectRecyclerClass::Get_Render_Object ( const char * name,
const Matrix3D & tm )

Definition at line 82 of file renderobjectrecycler.cpp.

◆ Reset()

void RenderObjectRecyclerClass::Reset ( void )

Definition at line 64 of file renderobjectrecycler.cpp.

◆ Return_Render_Object()

void RenderObjectRecyclerClass::Return_Render_Object ( RenderObjClass * obj)

Definition at line 127 of file renderobjectrecycler.cpp.


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