MaterialList Class Reference

#include <materialList.h>

Inheritance diagram for MaterialList:

Inheritance graph
[legend]
List of all members.

Public Types

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

Public Member Functions

 MaterialList ()
 MaterialList (U32 materialCount, const char **materialNames)
virtual ~MaterialList ()
 MaterialList (const MaterialList *)
 Note: this is not to be confused with MaterialList(const MaterialList&).
U32 getMaterialCount () const
const Vector< String > & getMaterialNameList () const
const StringgetMaterialName (U32 index) const
GFXTexHandlegetMaterial (U32 index)
void setMaterialName (U32 index, String name)
void set (U32 materialCount, const char **materialNames)
U32 push_back (GFXTexHandle textureHandle, const String &filename)
U32 push_back (const String &filename)
void load (U32 index, const String &path)
bool load (const String &path)
void unload ()
virtual void free ()
void clearMatInstList ()
GFXTexHandlefront ()
GFXTexHandlefirst ()
GFXTexHandlelast ()
bool empty () const
U32 size () const
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)
void mapMaterials ()
void initMatInstances (const GFXMaterialFeatureData &features, GFXVertexFlags vertexFlags)
BaseMatInstancegetMaterialInst (U32 texIndex)
void setMaterialInst (BaseMatInstance *matInst, U32 texIndex)

Protected Attributes

Vector< StringmMaterialNames
Vector< GFXTexHandlemMaterials
Vector< BaseMatInstance * > mMatInstList
GFXMaterialFeatureData mFeatures
GFXVertexFlags mVertexFlags

Private Types

 BINARY_FILE_VERSION = 1
enum  Constants { BINARY_FILE_VERSION = 1 }

Member Typedef Documentation

typedef Vector<GFXTexHandle>::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 
)

virtual MaterialList::~MaterialList (  )  [virtual]

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 restricting the copy syntax to ML* pML = new ML(&copy);


Member Function Documentation

U32 MaterialList::getMaterialCount (  )  const [inline]

const Vector<String>& MaterialList::getMaterialNameList (  )  const [inline]

const String& MaterialList::getMaterialName ( U32  index  )  const [inline]

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

void MaterialList::setMaterialName ( U32  index,
String  name 
)

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

U32 MaterialList::push_back ( GFXTexHandle  textureHandle,
const String filename 
)

U32 MaterialList::push_back ( const String filename  ) 

void MaterialList::load ( U32  index,
const String path 
)

bool MaterialList::load ( const String path  ) 

void MaterialList::unload (  ) 

virtual void MaterialList::free (  )  [virtual]

Reimplemented in TSMaterialList.

void MaterialList::clearMatInstList (  ) 

GFXTexHandle& MaterialList::front (  )  [inline]

GFXTexHandle& MaterialList::first (  )  [inline]

GFXTexHandle& MaterialList::last (  )  [inline]

bool MaterialList::empty (  )  const [inline]

U32 MaterialList::size (  )  const [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  ) 

void MaterialList::mapMaterials (  ) 

Reimplemented in TSMaterialList.

void MaterialList::initMatInstances ( const GFXMaterialFeatureData features,
GFXVertexFlags  vertexFlags 
)

BaseMatInstance* MaterialList::getMaterialInst ( U32  texIndex  ) 

void MaterialList::setMaterialInst ( BaseMatInstance matInst,
U32  texIndex 
)


Member Data Documentation