torque Torque Game Engine Documentation
TGE Version 1.5.2

TSMaterialList Class Reference

#include <tsShape.h>

Inheritance diagram for TSMaterialList:

Inheritance graph
[legend]

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

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),
  DetailMapOnly = BIT(29),
  BumpMapOnly = BIT(30),
  ReflectanceMapOnly = BIT(31),
  AuxiliaryMap = DetailMapOnly | BumpMapOnly | ReflectanceMapOnly
}

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 (U32 materialCount, const char **materialNames, const U32 *materialFlags, const U32 *reflectanceMaps, const U32 *bumpMaps, const U32 *detailMaps, const U32 *lightMaps, const F32 *detailScales, const F32 *reflectionAmounts)
 TSMaterialList ()
 TSMaterialList (const TSMaterialList *)
 ~TSMaterialList ()
void free ()
void load (U32 index, const char *path=0)
bool load (TextureHandleType type, const char *path=0, bool clampToEdge=false)
U32 getFlags (U32 index)
void setFlags (U32 index, U32 value)
void remap (U32 toIndex, U32 fromIndex)
 support for ifl sequences
void push_back (const char *name, U32 flags, U32 a=0xFFFFFFFF, U32 b=0xFFFFFFFF, U32 c=0xFFFFFFFF, F32 dm=1.0f, F32 em=1.0f, U32 l=0xFFFFFFFF)
 pre-load only ... support for ifl sequences
Lookups
TextureHandle * getReflectionMap (U32 index)
F32 getReflectionAmount (U32 index)
TextureHandle * getBumpMap (U32 index)
TextureHandle * getDetailMap (U32 index)
TextureHandle * getLightMap (U32 index)
F32 getDetailMapScale (U32 index)
bool reflectionInAlpha (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< U32mLightMaps
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 
DetailMapOnly 
BumpMapOnly 
ReflectanceMapOnly 
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 ( U32  materialCount,
const char **  materialNames,
const U32 materialFlags,
const U32 reflectanceMaps,
const U32 bumpMaps,
const U32 detailMaps,
const U32 lightMaps,
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.

void TSMaterialList::load ( U32  index,
const char *  path = 0 
) [virtual]

Reimplemented from MaterialList.

bool TSMaterialList::load ( TextureHandleType  type,
const char *  path = 0,
bool  clampToEdge = false 
) [inline]

Reimplemented from MaterialList.

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

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

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

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

TextureHandle* TSMaterialList::getLightMap ( U32  index  )  [inline]

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

bool TSMaterialList::reflectionInAlpha ( 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

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

pre-load only ... support for ifl sequences

bool TSMaterialList::write ( Stream  ) 

Reimplemented from MaterialList.

bool TSMaterialList::read ( Stream  ) 

Reimplemented from MaterialList.


Field Documentation




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen