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

#include <matpass.h>

Inherits RefCountClass.

Inherited by W3DMaskMaterialPassClass, and W3DShroudMaterialPassClass.

Public Member Functions

 MaterialPassClass (void)
 
 ~MaterialPassClass (void)
 
virtual void Install_Materials (void) const
 MW: Had to make this virtual so app can perform direct/custom D3D setup.
 
virtual void UnInstall_Materials (void) const
 
void Set_Texture (TextureClass *Texture, int stage=0)
 reset/cleanup D3D states
 
void Set_Shader (ShaderClass shader)
 
void Set_Material (VertexMaterialClass *mat)
 
TextureClassGet_Texture (int stage=0) const
 
VertexMaterialClassGet_Material (void) const
 
TextureClassPeek_Texture (int stage=0) const
 
ShaderClass Peek_Shader (void) const
 
VertexMaterialClassPeek_Material (void) const
 
void Set_Cull_Volume (OBBoxClass *volume)
 
OBBoxClassGet_Cull_Volume (void) const
 
void Enable_On_Translucent_Meshes (bool onoff)
 
bool Is_Enabled_On_Translucent_Meshes (void)
 
- Public Member Functions inherited from RefCountClass
 RefCountClass (void)
 
 RefCountClass (const RefCountClass &)
 
void Add_Ref (void) const
 
WWINLINE void Release_Ref (void) const
 
int Num_Refs (void) const
 
virtual void Delete_This (void)
 

Static Public Member Functions

static void Enable_Per_Polygon_Culling (bool onoff)
 
static bool Is_Per_Polygon_Culling_Enabled (void)
 
- Static Public Member Functions inherited from RefCountClass
static int Total_Refs (void)
 
static RefCountClassAdd_Active_Ref (RefCountClass *obj)
 
static RefCountClassSet_Ref_Owner (RefCountClass *obj, char *file, int line)
 
static void Remove_Active_Ref (RefCountClass *obj)
 
static bool Validate_Active_Ref (RefCountClass *obj)
 

Protected Types

enum  { MAX_TEX_STAGES = 8 }
 

Protected Attributes

TextureClassTexture [MAX_TEX_STAGES]
 
ShaderClass Shader
 
VertexMaterialClassMaterial
 
bool EnableOnTranslucentMeshes
 
OBBoxClassCullVolume
 

Static Protected Attributes

static bool EnablePerPolygonCulling = true
 

Additional Inherited Members

- Public Attributes inherited from RefCountClass
RefCountNodeClass ActiveRefNode
 
ActiveRefStruct ActiveRefInfo
 
- Static Public Attributes inherited from RefCountClass
static RefCountListClass ActiveRefList
 
- Protected Member Functions inherited from RefCountClass
virtual ~RefCountClass (void)
 

Detailed Description

MaterialPassClass

This class wraps all of the data needed to describe an additional material pass for any object. The motivation for this class is to implement certain types of special effects. All data needed to apply the pass should be generated procedurally. Typically a vertex processor will be used to generate any needed u-v's or vertex colors. Alternatively, we could add the option to request to re-use the model's existing u-v's or vertex colors.

Definition at line 78 of file matpass.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
MAX_TEX_STAGES 

Definition at line 111 of file matpass.h.

Constructor & Destructor Documentation

◆ MaterialPassClass()

MaterialPassClass::MaterialPassClass ( void )

Definition at line 72 of file matpass.cpp.

◆ ~MaterialPassClass()

MaterialPassClass::~MaterialPassClass ( void )

Definition at line 96 of file matpass.cpp.

Member Function Documentation

◆ Enable_On_Translucent_Meshes()

void MaterialPassClass::Enable_On_Translucent_Meshes ( bool onoff)
inline

Definition at line 103 of file matpass.h.

◆ Enable_Per_Polygon_Culling()

static void MaterialPassClass::Enable_Per_Polygon_Culling ( bool onoff)
inlinestatic

Definition at line 106 of file matpass.h.

◆ Get_Cull_Volume()

OBBoxClass * MaterialPassClass::Get_Cull_Volume ( void ) const
inline

Definition at line 101 of file matpass.h.

◆ Get_Material()

VertexMaterialClass * MaterialPassClass::Get_Material ( void ) const

Definition at line 228 of file matpass.cpp.

◆ Get_Texture()

TextureClass * MaterialPassClass::Get_Texture ( int stage = 0) const

Definition at line 203 of file matpass.cpp.

◆ Install_Materials()

void MaterialPassClass::Install_Materials ( void ) const
virtual

MW: Had to make this virtual so app can perform direct/custom D3D setup.

Reimplemented in W3DMaskMaterialPassClass, and W3DShroudMaterialPassClass.

Definition at line 118 of file matpass.cpp.

◆ Is_Enabled_On_Translucent_Meshes()

bool MaterialPassClass::Is_Enabled_On_Translucent_Meshes ( void )
inline

Definition at line 104 of file matpass.h.

◆ Is_Per_Polygon_Culling_Enabled()

static bool MaterialPassClass::Is_Per_Polygon_Culling_Enabled ( void )
inlinestatic

Definition at line 107 of file matpass.h.

◆ Peek_Material()

VertexMaterialClass * MaterialPassClass::Peek_Material ( void ) const
inline

Definition at line 98 of file matpass.h.

◆ Peek_Shader()

ShaderClass MaterialPassClass::Peek_Shader ( void ) const
inline

Definition at line 97 of file matpass.h.

◆ Peek_Texture()

TextureClass * MaterialPassClass::Peek_Texture ( int stage = 0) const
inline

Definition at line 124 of file matpass.h.

◆ Set_Cull_Volume()

void MaterialPassClass::Set_Cull_Volume ( OBBoxClass * volume)
inline

Definition at line 100 of file matpass.h.

◆ Set_Material()

void MaterialPassClass::Set_Material ( VertexMaterialClass * mat)

Definition at line 184 of file matpass.cpp.

◆ Set_Shader()

void MaterialPassClass::Set_Shader ( ShaderClass shader)

Definition at line 164 of file matpass.cpp.

◆ Set_Texture()

void MaterialPassClass::Set_Texture ( TextureClass * Texture,
int stage = 0 )

reset/cleanup D3D states

Definition at line 142 of file matpass.cpp.

◆ UnInstall_Materials()

virtual void MaterialPassClass::UnInstall_Materials ( void ) const
inlinevirtual

Reimplemented in W3DMaskMaterialPassClass, and W3DShroudMaterialPassClass.

Definition at line 87 of file matpass.h.

Member Data Documentation

◆ CullVolume

OBBoxClass* MaterialPassClass::CullVolume
protected

Definition at line 118 of file matpass.h.

◆ EnableOnTranslucentMeshes

bool MaterialPassClass::EnableOnTranslucentMeshes
protected

Definition at line 116 of file matpass.h.

◆ EnablePerPolygonCulling

bool MaterialPassClass::EnablePerPolygonCulling = true
staticprotected

Definition at line 119 of file matpass.h.

◆ Material

VertexMaterialClass* MaterialPassClass::Material
protected

Definition at line 115 of file matpass.h.

◆ Shader

ShaderClass MaterialPassClass::Shader
protected

Definition at line 114 of file matpass.h.

◆ Texture

TextureClass* MaterialPassClass::Texture[MAX_TEX_STAGES]
protected

Definition at line 113 of file matpass.h.


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