torque Torque Game Engine Documentation
TGE Version 1.5.2

MaterialList Class Reference

#include <materialList.h>

Inheritance diagram for MaterialList:

Inheritance graph
[legend]

Public Types

typedef Vector< TextureHandle
>::iterator 
iterator
typedef Vector< TextureHandle
>::value_type 
value

Public Member Functions

 MaterialList ()
 MaterialList (U32 materialCount, const char **materialNames)
 ~MaterialList ()
 MaterialList (const MaterialList *)
 Note: this is not to be confused with MaterialList(const MaterialList&).
U32 getMaterialCount ()
const char * getMaterialName (U32 index)
TextureHandle & getMaterial (U32 index)
void setTextureType (TextureHandleType type)
void setClampToEdge (bool tf)
void set (U32 materialCount, const char **materialNames)
U32 push_back (TextureHandle textureHandle, const char *filename)
U32 push_back (const char *filename)
U32 push_back (const char *filename, GBitmap *bmp, TextureHandleType type, bool clampToEdge=false)
virtual void load (U32 index, const char *path=0)
bool load (const char *path=0)
bool load (TextureHandleType type, const char *path=0, bool clampToEdge=false)
void unload ()
virtual void free ()
TextureHandle & front ()
TextureHandle & first ()
TextureHandle & last ()
bool empty ()
U32 size ()
iterator begin ()
iterator end ()
value operator[] (S32 index)
bool read (Stream &stream)
bool write (Stream &stream)
bool readText (Stream &stream, U8 firstByte)
bool readText (Stream &stream)
bool writeText (Stream &stream)

Data Fields

VectorPtr< char * > mMaterialNames
Vector< TextureHandle > mMaterials

Protected Attributes

bool mClampToEdge
TextureHandleType mTextureType

Private Types

enum  Constants { BINARY_FILE_VERSION = 1 }

Friends

class TSMaterialList

Member Typedef Documentation

typedef Vector<TextureHandle>::iterator MaterialList::iterator

typedef Vector<TextureHandle>::value_type MaterialList::value


Member Enumeration Documentation

enum MaterialList::Constants [private]

Enumerator:
BINARY_FILE_VERSION 


Constructor & Destructor Documentation

MaterialList::MaterialList (  ) 

MaterialList::MaterialList ( U32  materialCount,
const char **  materialNames 
)

MaterialList::~MaterialList (  ) 

MaterialList::MaterialList ( const MaterialList  )  [explicit]

Note: this is not to be confused with MaterialList(const MaterialList&).

Copying a material list in the middle of it's lifetime is not a good thing, so we force it to copy at construction time by retricting the copy syntax to ML* pML = new ML(&copy);


Member Function Documentation

U32 MaterialList::getMaterialCount (  )  [inline]

const char* MaterialList::getMaterialName ( U32  index  )  [inline]

TextureHandle& MaterialList::getMaterial ( U32  index  )  [inline]

void MaterialList::setTextureType ( TextureHandleType  type  )  [inline]

void MaterialList::setClampToEdge ( bool  tf  )  [inline]

void MaterialList::set ( U32  materialCount,
const char **  materialNames 
)

U32 MaterialList::push_back ( TextureHandle  textureHandle,
const char *  filename 
)

U32 MaterialList::push_back ( const char *  filename  ) 

U32 MaterialList::push_back ( const char *  filename,
GBitmap bmp,
TextureHandleType  type,
bool  clampToEdge = false 
)

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

Reimplemented in TSMaterialList.

bool MaterialList::load ( const char *  path = 0  ) 

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

Reimplemented in TSMaterialList.

void MaterialList::unload (  ) 

virtual void MaterialList::free (  )  [virtual]

Reimplemented in TSMaterialList.

TextureHandle& MaterialList::front (  )  [inline]

TextureHandle& MaterialList::first (  )  [inline]

TextureHandle& MaterialList::last (  )  [inline]

bool MaterialList::empty (  )  [inline]

U32 MaterialList::size (  )  [inline]

iterator MaterialList::begin (  )  [inline]

iterator MaterialList::end (  )  [inline]

value MaterialList::operator[] ( S32  index  )  [inline]

bool MaterialList::read ( Stream stream  ) 

Reimplemented in TSMaterialList.

bool MaterialList::write ( Stream stream  ) 

Reimplemented in TSMaterialList.

bool MaterialList::readText ( Stream stream,
U8  firstByte 
)

bool MaterialList::readText ( Stream stream  ) 

bool MaterialList::writeText ( Stream stream  ) 


Friends And Related Function Documentation

friend class TSMaterialList [friend]


Field Documentation

bool MaterialList::mClampToEdge [protected]




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