My Project
|
the material information for ParaX file More...
#include <ParaXMaterial.h>
Public Types | |
enum | AttributeBits { MATERIAL_BLENDING = 0x1, MATERIAL_ALPHATESTING = 0x1 << 1, MATERIAL_ZMASKING = 0x1 << 2, MATERIAL_NORMALMAP = 0x1 << 3, MATERIAL_ENVIRONMENTMAP = 0x1 << 4, MATERIAL_REFLECTION = 0x1 << 5, MATERIAL_LIGHTMAP = 0x1 << 6, MATERIAL_DISABLE_PHYSICS = 0x1 << 7, MATERIAL_DISABLE_LIGHTING = 0x1 << 8, MATERIAL_ADDITIVE = 0x1 << 9, MATERIAL_BILLBOARD = 0x1 << 10, MATERIAL_BILLBOARD_AA = 0x1 << 11, MATERIAL_TRANSLUCENT_SORT = 0x1 << 12, MATERIAL_SKIP_RENDER = 0x1 << 13 } |
Public Member Functions | |
CParaXMaterial () | |
default constructor | |
float | GetReflectivity () |
Get the reflectivity of environment or reflection map. More... | |
void | SetReflectivity (float fReflectivity) |
Set the reflectivity of environment or reflection map. More... | |
bool | hasAlphaBlending () |
bool | hasAlphaTesting () |
bool | hasZMask () |
bool | hasNormalMap () |
bool | hasEnvironmentMap () |
bool | hasReflectionMap () |
bool | hasLightMap () |
bool | hasPhysics () |
bool | hasLighting () |
bool | hasTranslucentSort () |
bool | hasAdditive () |
bool | hasAnyBillboard () |
bool | hasBillboard () |
bool | hasBillboardAA () |
bool | isSkipRendering () |
bool | CheckAttribute (DWORD attribute) |
whether a material attribute is enabled. More... | |
void | EnableAttribute (DWORD attribute, bool bTurnOn=true) |
enable or disable a given attribute | |
int | GetPhysicsGroup () |
get the physics group. More... | |
void | SetMaterial (const ParaMaterial &material) |
read from material, whether to use blend, alpha test or global textures, etc. More... | |
Public Attributes | |
ParaMaterial | mat |
basic material information in the original DirectX format. | |
DWORD | dwAttribute |
a bitwise mask of AttributeBits. More... | |
asset_ptr< TextureEntity > | m_pTexture1 |
first texture. | |
asset_ptr< TextureEntity > | m_pTexture2 |
secondary texture: such as cube map and normal map. | |
int | m_nReplaceableTextureID |
if this is -1, no replaceable texture is used. More... | |
int | m_nTranslucentFaceGroupIndex |
index into the mesh object's m_faceGroups. More... | |
int | m_nPhysicsGroup |
the physics group. More... | |
float | m_fRelectionHeight |
reflection surface height in model space | |
Vector3 | m_vPivot |
only used in billboarded and axis aligned billboarded materials. More... | |
the material information for ParaX file
|
inline |
whether a material attribute is enabled.
attribute |
|
inline |
get the physics group.
|
inline |
Get the reflectivity of environment or reflection map.
|
inline |
read from material, whether to use blend, alpha test or global textures, etc.
these information is currently encoded in the bits of specular power component of mat. TODO: I guess X file reference will support it in its future release. or maybe I shall manually parse X-file to add explicit support.
|
inline |
Set the reflectivity of environment or reflection map.
DWORD ParaEngine::CParaXMaterial::dwAttribute |
a bitwise mask of AttributeBits.
int ParaEngine::CParaXMaterial::m_nPhysicsGroup |
the physics group.
default to 0.
int ParaEngine::CParaXMaterial::m_nReplaceableTextureID |
if this is -1, no replaceable texture is used.
if not, it is the ID or index into the replaceable texture array. generally speaking, replaceable ID 0 is used for general purpose replaceable texture, ID 1 is for user defined. ID 2 is for custom skins.
int ParaEngine::CParaXMaterial::m_nTranslucentFaceGroupIndex |
index into the mesh object's m_faceGroups.
This value is only valid when MATERIAL_TRANSLUCENT_SORT attribute is set.
Vector3 ParaEngine::CParaXMaterial::m_vPivot |
only used in billboarded and axis aligned billboarded materials.