TSMaterialList Class Reference

#include <tsShape.h>

Inheritance diagram for TSMaterialList:

Inheritance graph
[legend]
List of all members.

Detailed Description

Specialized material list for 3space objects.

Note:
Reflectance amounts on 3space objects are determined by the alpha channel of the base material texture


Public Types

 S_Wrap = BIT(0)
 T_Wrap = BIT(1)
 Translucent = BIT(2)
 Additive = BIT(3)
 Subtractive = BIT(4)
 SelfIlluminating = BIT(5)
 NeverEnvMap = BIT(6)
 NoMipMap = BIT(7)
 MipMap_ZeroBorder = BIT(8)
 IflMaterial = BIT(27)
 IflFrame = BIT(28)
 AuxiliaryMap = BIT(29) | BIT(30) | BIT(31)
enum  {
  S_Wrap = BIT(0),
  T_Wrap = BIT(1),
  Translucent = BIT(2),
  Additive = BIT(3),
  Subtractive = BIT(4),
  SelfIlluminating = BIT(5),
  NeverEnvMap = BIT(6),
  NoMipMap = BIT(7),
  MipMap_ZeroBorder = BIT(8),
  IflMaterial = BIT(27),
  IflFrame = BIT(28),
  AuxiliaryMap = BIT(29) | BIT(30) | BIT(31)
}

Public Member Functions

 TSMaterialList (U32 materialCount, const char **materialNames, const U32 *materialFlags, const U32 *reflectanceMaps, const U32 *bumpMaps, const U32 *detailMaps, const F32 *detailScales, const F32 *reflectionAmounts)
 TSMaterialList ()
 TSMaterialList (const TSMaterialList *)
 ~TSMaterialList ()
void free ()
U32 getFlags (U32 index)
void setFlags (U32 index, U32 value)
void remap (U32 toIndex, U32 fromIndex)
 support for ifl sequences
bool setMaterial (U32 index, const Torque::Path &texturePath)
void mapMaterials ()
void push_back (const String &name, U32 flags, U32 a=0xFFFFFFFF, U32 b=0xFFFFFFFF, U32 c=0xFFFFFFFF, F32 dm=1.0f, F32 em=1.0f)
 pre-load only ... support for ifl sequences
Lookups
GFXTexHandlegetReflectionMap (U32 index)
F32 getReflectionAmount (U32 index)
GFXTexHandlegetBumpMap (U32 index)
GFXTexHandlegetDetailMap (U32 index)
F32 getDetailMapScale (U32 index)
bool reflectionInAlpha (U32 index)
bool isIFL (U32 index)
IO
Functions for reading/writing to/from streams

bool write (Stream &)
bool read (Stream &)

Private Types

typedef MaterialList Parent

Private Member Functions

void allocate (U32 sz)

Private Attributes

Vector< U32mFlags
Vector< U32mReflectanceMaps
Vector< U32mBumpMaps
Vector< U32mDetailMaps
Vector< F32mDetailScales
Vector< F32mReflectionAmounts
bool mNamesTransformed


Member Typedef Documentation


Member Enumeration Documentation

anonymous enum

Enumerator:
S_Wrap 
T_Wrap 
Translucent 
Additive 
Subtractive 
SelfIlluminating 
NeverEnvMap 
NoMipMap 
MipMap_ZeroBorder 
IflMaterial 
IflFrame 
AuxiliaryMap 


Constructor & Destructor Documentation

TSMaterialList::TSMaterialList ( U32  materialCount,
const char **  materialNames,
const U32 materialFlags,
const U32 reflectanceMaps,
const U32 bumpMaps,
const U32 detailMaps,
const F32 detailScales,
const F32 reflectionAmounts 
)

TSMaterialList::TSMaterialList (  ) 

TSMaterialList::TSMaterialList ( const TSMaterialList  ) 

TSMaterialList::~TSMaterialList (  ) 


Member Function Documentation

void TSMaterialList::allocate ( U32  sz  )  [private]

void TSMaterialList::free (  )  [virtual]

Reimplemented from MaterialList.

GFXTexHandle* TSMaterialList::getReflectionMap ( U32  index  )  [inline]

F32 TSMaterialList::getReflectionAmount ( U32  index  )  [inline]

GFXTexHandle* TSMaterialList::getBumpMap ( U32  index  )  [inline]

GFXTexHandle* TSMaterialList::getDetailMap ( U32  index  )  [inline]

F32 TSMaterialList::getDetailMapScale ( U32  index  )  [inline]

bool TSMaterialList::reflectionInAlpha ( U32  index  )  [inline]

bool TSMaterialList::isIFL ( U32  index  )  [inline]

U32 TSMaterialList::getFlags ( U32  index  ) 

void TSMaterialList::setFlags ( U32  index,
U32  value 
)

void TSMaterialList::remap ( U32  toIndex,
U32  fromIndex 
)

support for ifl sequences

bool TSMaterialList::setMaterial ( U32  index,
const Torque::Path texturePath 
)

void TSMaterialList::mapMaterials (  ) 

Reimplemented from MaterialList.

void TSMaterialList::push_back ( const String name,
U32  flags,
U32  a = 0xFFFFFFFF,
U32  b = 0xFFFFFFFF,
U32  c = 0xFFFFFFFF,
F32  dm = 1.0f,
F32  em = 1.0f 
)

pre-load only ... support for ifl sequences

bool TSMaterialList::write ( Stream  ) 

Reimplemented from MaterialList.

bool TSMaterialList::read ( Stream  ) 

Reimplemented from MaterialList.


Member Data Documentation