Material Class Reference#include <materialDefinition.h>
Inheritance diagram for Material:
[legend]List of all members.
|
Public Types |
| MAX_TEX_PER_PASS = 8 |
| Number of textures per pass.
|
| MAX_STAGES = 4 |
| NUM_EFFECT_COLOR_STAGES = 2 |
| Number of effect color definitions for transitioning effects.
|
| NoTexture = 0 |
| Standard = 1 |
| Detail |
| Bump |
| Env |
| Cube |
| SGCube |
| Lightmap |
| NormLightmap |
| Mask |
| Fog |
| BlackFog |
| BackBuff |
| ReflectBuff |
| Misc |
| DynamicLight |
| DynamicLight2 |
| DynamicLight3 |
| DynamicLight4 |
| DynamicLightSecondary |
| DynamicLightMask |
| NormalizeCube |
| None = 0 |
| Mul |
| Add |
| AddAlpha |
| Sub |
| LerpAlpha |
| NumBlendTypes |
| Scroll = 1 |
| Rotate = 2 |
| Wave = 4 |
| Scale = 8 |
| Sequence = 16 |
| Sin = 0 |
| Triangle |
| Square |
enum | Constants {
MAX_TEX_PER_PASS = 8,
MAX_STAGES = 4,
NUM_EFFECT_COLOR_STAGES = 2
} |
enum | TexType {
NoTexture = 0,
Standard = 1,
Detail,
Bump,
Env,
Cube,
SGCube,
Lightmap,
NormLightmap,
Mask,
Fog,
BlackFog,
BackBuff,
ReflectBuff,
Misc,
DynamicLight,
DynamicLight2,
DynamicLight3,
DynamicLight4,
DynamicLightSecondary,
DynamicLightMask,
NormalizeCube
} |
enum | BlendOp {
None = 0,
Mul,
Add,
AddAlpha,
Sub,
LerpAlpha,
NumBlendTypes
} |
enum | AnimType {
Scroll = 1,
Rotate = 2,
Wave = 4,
Scale = 8,
Sequence = 16
} |
enum | WaveType {
Sin = 0,
Triangle,
Square
} |
Public Member Functions |
| Material () |
| Material interface.
|
virtual BaseMatInstance * | createMatInstance () |
| Allocates and returns a BaseMatInstance for this material.
|
virtual bool | isIFL () const |
virtual bool | isTranslucent () const |
virtual bool | isDoubleSided () const |
const String & | getPath () const |
void | updateTimeBasedParams () |
| Called to update time based parameters for a material.
|
virtual bool | onAdd () |
| SimObject interface.
|
virtual void | onRemove () |
| Called when the object is removed from the sim.
|
| DECLARE_CONOBJECT (Material) |
Static Public Member Functions |
static GFXCubemap * | getNormalizeCube () |
static void | initPersistFields () |
| Register dynamic fields in a subclass of ConsoleObject.
|
Public Attributes |
FileName | mBaseTexFilename [MAX_STAGES] |
FileName | mDetailFilename [MAX_STAGES] |
FileName | mBumpFilename [MAX_STAGES] |
FileName | mEnvFilename [MAX_STAGES] |
StageData | mStages [MAX_STAGES] |
ColorF | mDiffuse [MAX_STAGES] |
ColorF | mSpecular [MAX_STAGES] |
ColorF | mColorMultiply [MAX_STAGES] |
F32 | mSpecularPower [MAX_STAGES] |
bool | mPixelSpecular [MAX_STAGES] |
bool | mVertexSpecular [MAX_STAGES] |
F32 | mDetailScale [MAX_STAGES] |
| Per stage control over the repetition scale of the detail texture over the base texture.
|
U32 | mExposure [MAX_STAGES] |
U32 | mAnimFlags [MAX_STAGES] |
Point2F | mScrollDir [MAX_STAGES] |
F32 | mScrollSpeed [MAX_STAGES] |
Point2F | mScrollOffset [MAX_STAGES] |
F32 | mRotSpeed [MAX_STAGES] |
Point2F | mRotPivotOffset [MAX_STAGES] |
F32 | mRotPos [MAX_STAGES] |
F32 | mWavePos [MAX_STAGES] |
F32 | mWaveFreq [MAX_STAGES] |
F32 | mWaveAmp [MAX_STAGES] |
U32 | mWaveType [MAX_STAGES] |
F32 | mSeqFramePerSec [MAX_STAGES] |
F32 | mSeqSegSize [MAX_STAGES] |
bool | mGlow [MAX_STAGES] |
bool | mEmissive [MAX_STAGES] |
bool | mDoubleSided |
String | mCubemapName |
CubemapData * | mCubemapData |
bool | mDynamicCubemap |
bool | mTranslucent |
BlendOp | mTranslucentBlendOp |
bool | mTranslucentZWrite |
bool | mAlphaTest |
U32 | mAlphaRef |
bool | mPlanarReflection |
String | mMapTo |
|
bool | mShowFootprints |
| Behavioral properties. If true, show footprints when walking on surface with this material. Defaults to false.
|
bool | mShowDust |
| If true, show dust emitters (footpuffs, hover trails, etc) when on surface with this material. Defaults to false.
|
ColorF | mEffectColor [NUM_EFFECT_COLOR_STAGES] |
| Color to use for particle effects and such when located on this material.
|
S32 | mFootstepSoundId |
| Footstep sound to play when walking on surface with this material.
|
S32 | mImpactSoundId |
SFXProfile * | mFootstepSoundCustom |
| Sound effect to play when walking on surface with this material.
|
SFXProfile * | mImpactSoundCustom |
F32 | mFriction |
| Friction coefficient when moving along surface.
|
Protected Member Functions |
virtual void | _mapMaterial () |
Protected Attributes |
U32 | mLastUpdateTime |
bool | mIsIFL |
String | mPath |
Static Protected Attributes |
static EnumTable | mBlendOpTable |
static EnumTable | mWaveTypeTable |
Private Types |
typedef BaseMaterialDefinition | Parent |
Static Private Attributes |
static GFXCubemapHandle | normalizeCube |
Classes |
struct | StageData |
Member Typedef Documentation
Member Enumeration Documentation
- Enumerator:
-
MAX_TEX_PER_PASS |
Number of textures per pass. |
MAX_STAGES |
|
NUM_EFFECT_COLOR_STAGES |
Number of effect color definitions for transitioning effects. |
- Enumerator:
-
NoTexture |
|
Standard |
|
Detail |
|
Bump |
|
Env |
|
Cube |
|
SGCube |
|
Lightmap |
|
NormLightmap |
|
Mask |
|
Fog |
|
BlackFog |
|
BackBuff |
|
ReflectBuff |
|
Misc |
|
DynamicLight |
|
DynamicLight2 |
|
DynamicLight3 |
|
DynamicLight4 |
|
DynamicLightSecondary |
|
DynamicLightMask |
|
NormalizeCube |
|
- Enumerator:
-
None |
|
Mul |
|
Add |
|
AddAlpha |
|
Sub |
|
LerpAlpha |
|
NumBlendTypes |
|
- Enumerator:
-
Scroll |
|
Rotate |
|
Wave |
|
Scale |
|
Sequence |
|
Constructor & Destructor Documentation
Member Function Documentation
static GFXCubemap* Material::getNormalizeCube |
( |
|
) |
[static] |
virtual bool Material::isIFL |
( |
|
) |
const [inline, virtual] |
virtual bool Material::isTranslucent |
( |
|
) |
const [inline, virtual] |
virtual bool Material::isDoubleSided |
( |
|
) |
const [inline, virtual] |
const String& Material::getPath |
( |
|
) |
const [inline] |
void Material::updateTimeBasedParams |
( |
|
) |
|
Called to update time based parameters for a material.
Ensures that it only happens once per tick.
virtual bool Material::onAdd |
( |
|
) |
[virtual] |
virtual void Material::onRemove |
( |
|
) |
[virtual] |
static void Material::initPersistFields |
( |
|
) |
[static] |
Material::DECLARE_CONOBJECT |
( |
Material |
|
) |
|
virtual void Material::_mapMaterial |
( |
|
) |
[protected, virtual] |
Member Data Documentation
Per stage control over the repetition scale of the detail texture over the base texture.
Behavioral properties. If true, show footprints when walking on surface with this material. Defaults to false.
If true, show dust emitters (footpuffs, hover trails, etc) when on surface with this material. Defaults to false.
Color to use for particle effects and such when located on this material.
Footstep sound to play when walking on surface with this material.
Numeric ID of footstep sound defined on player datablock (0 == soft, 1 == hard, 2 == metal, 3 == snow). Defaults to -1 which deactivates default sound. - See also:
- mFootstepSoundCustom
Sound effect to play when walking on surface with this material.
If defined, overrides mFootstepSoundId. - See also:
- mFootstepSoundCustom
Friction coefficient when moving along surface.
|