2 #include "TextureEntity.h" 76 CParaXMaterial() :m_nReplaceableTextureID(-1), dwAttribute(0), m_nTranslucentFaceGroupIndex(-1), m_fRelectionHeight(0.f), m_vPivot(0, 0, 0), m_nPhysicsGroup(0){};
108 return (dwAttribute & (DWORD)attribute) > 0;
114 dwAttribute |= attribute;
116 dwAttribute &= ~attribute;
129 #define MAX_MATERIAL_POWER 1000.f 130 dwAttribute = (int)(mat.Power / MAX_MATERIAL_POWER);
131 mat.Power -= dwAttribute*MAX_MATERIAL_POWER;
void EnableAttribute(DWORD attribute, bool bTurnOn=true)
enable or disable a given attribute
Definition: ParaXMaterial.h:112
whether do reflection mapping. The reflectivity of the map is encoded in the red value of the emissiv...
Definition: ParaXMaterial.h:31
whether physics is disabled.
Definition: ParaXMaterial.h:36
AttributeBits
Definition: ParaXMaterial.h:14
whether do environment mapping.
Definition: ParaXMaterial.h:29
asset_ptr< TextureEntity > m_pTexture1
first texture.
Definition: ParaXMaterial.h:57
different physics engine has different winding order.
Definition: EventBinding.h:32
axis aligned billboarded
Definition: ParaXMaterial.h:44
asset_ptr< TextureEntity > m_pTexture2
secondary texture: such as cube map and normal map.
Definition: ParaXMaterial.h:59
whether to enable alpha testing. i.e. whether the texture alpha is used for alpha testing...
Definition: ParaXMaterial.h:18
Vector3 m_vPivot
only used in billboarded and axis aligned billboarded materials.
Definition: ParaXMaterial.h:72
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
DWORD dwAttribute
a bitwise mask of AttributeBits.
Definition: ParaXMaterial.h:54
whether lighting is disabled.
Definition: ParaXMaterial.h:38
void SetMaterial(const ParaMaterial &material)
read from material, whether to use blend, alpha test or global textures, etc.
Definition: ParaXMaterial.h:127
void SetReflectivity(float fReflectivity)
Set the reflectivity of environment or reflection map.
Definition: ParaXMaterial.h:83
whether to turn off z buffer write, when it is rendered with alpha blending.
Definition: ParaXMaterial.h:21
Definition: RenderCore.h:50
float m_fRelectionHeight
reflection surface height in model space
Definition: ParaXMaterial.h:70
billboarded
Definition: ParaXMaterial.h:42
int m_nTranslucentFaceGroupIndex
index into the mesh object's m_faceGroups.
Definition: ParaXMaterial.h:66
the material information for ParaX file
Definition: ParaXMaterial.h:9
whether to enable alpha blending, i.e. whether the texture alpha is used for blending.
Definition: ParaXMaterial.h:16
whether has normal mapping.
Definition: ParaXMaterial.h:25
int GetPhysicsGroup()
get the physics group.
Definition: ParaXMaterial.h:120
(added automatically) whether use translucent sorting. If set, it will use face group sorting for tra...
Definition: ParaXMaterial.h:48
bool CheckAttribute(DWORD attribute)
whether a material attribute is enabled.
Definition: ParaXMaterial.h:107
int m_nPhysicsGroup
the physics group.
Definition: ParaXMaterial.h:68
int m_nReplaceableTextureID
if this is -1, no replaceable texture is used.
Definition: ParaXMaterial.h:63
ParaMaterial mat
basic material information in the original DirectX format.
Definition: ParaXMaterial.h:12
CParaXMaterial()
default constructor
Definition: ParaXMaterial.h:76
whether do light mapping.
Definition: ParaXMaterial.h:34
whether additive alpha or one alpha blending is enabled. if MATERIAL_BLENDING, it is ADDITIVE_ALPHA...
Definition: ParaXMaterial.h:40
(added automatically if mesh texture file ends with _pg[1-9].xxx).
Definition: ParaXMaterial.h:51
float GetReflectivity()
Get the reflectivity of environment or reflection map.
Definition: ParaXMaterial.h:80