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

#include <w3dmtl.h>

Public Types

enum  { MAX_PASSES = 4 , MAX_STAGES = 2 }
 

Public Member Functions

 W3dMaterialClass (void)
 
 ~W3dMaterialClass (void)
 
void Reset (void)
 
void Init (Mtl *mtl, char *materialColorTexture=NULL)
 
void Init (GameMtl *gamemtl, char *materialColorTexture=NULL)
 
void Set_Surface_Type (unsigned int type)
 
void Set_Sort_Level (int level)
 
void Set_Pass_Count (int count)
 
void Set_Vertex_Material (const W3dVertexMaterialStruct &vmat, int pass=0)
 
void Set_Mapper_Args (const char *args_buffer, int pass=0, int stage=0)
 
void Set_Shader (const W3dShaderStruct &shader, int pass=0)
 
void Set_Texture (const W3dMapClass &map, int pass=0, int stage=0)
 
void Set_Map_Channel (int pass, int stage, int channel)
 
unsigned int Get_Surface_Type (void) const
 
int Get_Sort_Level (void) const
 
int Get_Pass_Count (void) const
 
W3dVertexMaterialStructGet_Vertex_Material (int pass=0) const
 
const char * Get_Mapper_Args (int pass, int stage) const
 
W3dShaderStruct Get_Shader (int pass=0) const
 
W3dMapClassGet_Texture (int pass=0, int stage=0) const
 
int Get_Map_Channel (int pass=0, int stage=0) const
 
bool Is_Multi_Pass_Transparent (void) const
 

Protected Member Functions

void Free (void)
 

Protected Attributes

unsigned int SurfaceType
 
int SortLevel
 
int PassCount
 
W3dShaderStruct Shaders [MAX_PASSES]
 
W3dVertexMaterialStructMaterials [MAX_PASSES]
 
char * MapperArgs [MAX_PASSES][MAX_STAGES]
 
W3dMapClassTextures [MAX_PASSES][MAX_STAGES]
 
int MapChannel [MAX_PASSES][MAX_STAGES]
 

Detailed Description

Definition at line 82 of file w3dmtl.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX_PASSES 
MAX_STAGES 

Definition at line 89 of file w3dmtl.h.

Constructor & Destructor Documentation

◆ W3dMaterialClass()

W3dMaterialClass::W3dMaterialClass ( void )

Definition at line 150 of file w3dmtl.cpp.

◆ ~W3dMaterialClass()

W3dMaterialClass::~W3dMaterialClass ( void )

Definition at line 165 of file w3dmtl.cpp.

Member Function Documentation

◆ Free()

void W3dMaterialClass::Free ( void )
protected

Definition at line 170 of file w3dmtl.cpp.

◆ Get_Map_Channel()

int W3dMaterialClass::Get_Map_Channel ( int pass = 0,
int stage = 0 ) const

Definition at line 329 of file w3dmtl.cpp.

◆ Get_Mapper_Args()

const char * W3dMaterialClass::Get_Mapper_Args ( int pass,
int stage ) const

Definition at line 302 of file w3dmtl.cpp.

◆ Get_Pass_Count()

int W3dMaterialClass::Get_Pass_Count ( void ) const

Definition at line 289 of file w3dmtl.cpp.

◆ Get_Shader()

W3dShaderStruct W3dMaterialClass::Get_Shader ( int pass = 0) const

Definition at line 312 of file w3dmtl.cpp.

◆ Get_Sort_Level()

int W3dMaterialClass::Get_Sort_Level ( void ) const

Definition at line 284 of file w3dmtl.cpp.

◆ Get_Surface_Type()

unsigned int W3dMaterialClass::Get_Surface_Type ( void ) const

Definition at line 279 of file w3dmtl.cpp.

◆ Get_Texture()

W3dMapClass * W3dMaterialClass::Get_Texture ( int pass = 0,
int stage = 0 ) const

Definition at line 319 of file w3dmtl.cpp.

◆ Get_Vertex_Material()

W3dVertexMaterialStruct * W3dMaterialClass::Get_Vertex_Material ( int pass = 0) const

Definition at line 294 of file w3dmtl.cpp.

◆ Init() [1/2]

void W3dMaterialClass::Init ( GameMtl * gamemtl,
char * materialColorTexture = NULL )

Definition at line 468 of file w3dmtl.cpp.

◆ Init() [2/2]

void W3dMaterialClass::Init ( Mtl * mtl,
char * materialColorTexture = NULL )
Todo
: Fix this for substituted textures.
Todo
: Fix this to procedural name/path

Definition at line 339 of file w3dmtl.cpp.

◆ Is_Multi_Pass_Transparent()

bool W3dMaterialClass::Is_Multi_Pass_Transparent ( void ) const

Definition at line 666 of file w3dmtl.cpp.

◆ Reset()

void W3dMaterialClass::Reset ( void )

Definition at line 193 of file w3dmtl.cpp.

◆ Set_Map_Channel()

void W3dMaterialClass::Set_Map_Channel ( int pass,
int stage,
int channel )

Definition at line 272 of file w3dmtl.cpp.

◆ Set_Mapper_Args()

void W3dMaterialClass::Set_Mapper_Args ( const char * args_buffer,
int pass = 0,
int stage = 0 )

Definition at line 235 of file w3dmtl.cpp.

◆ Set_Pass_Count()

void W3dMaterialClass::Set_Pass_Count ( int count)

Definition at line 217 of file w3dmtl.cpp.

◆ Set_Shader()

void W3dMaterialClass::Set_Shader ( const W3dShaderStruct & shader,
int pass = 0 )

Definition at line 253 of file w3dmtl.cpp.

◆ Set_Sort_Level()

void W3dMaterialClass::Set_Sort_Level ( int level)

Definition at line 211 of file w3dmtl.cpp.

◆ Set_Surface_Type()

void W3dMaterialClass::Set_Surface_Type ( unsigned int type)

Definition at line 206 of file w3dmtl.cpp.

◆ Set_Texture()

void W3dMaterialClass::Set_Texture ( const W3dMapClass & map,
int pass = 0,
int stage = 0 )

Definition at line 261 of file w3dmtl.cpp.

◆ Set_Vertex_Material()

void W3dMaterialClass::Set_Vertex_Material ( const W3dVertexMaterialStruct & vmat,
int pass = 0 )

Definition at line 224 of file w3dmtl.cpp.

Member Data Documentation

◆ MapChannel

int W3dMaterialClass::MapChannel[MAX_PASSES][MAX_STAGES]
protected

Definition at line 137 of file w3dmtl.h.

◆ MapperArgs

char* W3dMaterialClass::MapperArgs[MAX_PASSES][MAX_STAGES]
protected

Definition at line 135 of file w3dmtl.h.

◆ Materials

W3dVertexMaterialStruct* W3dMaterialClass::Materials[MAX_PASSES]
protected

Definition at line 134 of file w3dmtl.h.

◆ PassCount

int W3dMaterialClass::PassCount
protected

Definition at line 131 of file w3dmtl.h.

◆ Shaders

W3dShaderStruct W3dMaterialClass::Shaders[MAX_PASSES]
protected

Definition at line 133 of file w3dmtl.h.

◆ SortLevel

int W3dMaterialClass::SortLevel
protected

Definition at line 130 of file w3dmtl.h.

◆ SurfaceType

unsigned int W3dMaterialClass::SurfaceType
protected

Definition at line 129 of file w3dmtl.h.

◆ Textures

W3dMapClass* W3dMaterialClass::Textures[MAX_PASSES][MAX_STAGES]
protected

Definition at line 136 of file w3dmtl.h.


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