vtdata library
Public Member Functions | Protected Attributes | List of all members
vtContentManager Class Reference

Public Member Functions

void ReadXML (const char *filename)
 
void WriteXML (const char *filename) const
 
void Clear ()
 
void AddItem (vtItem *item)
 
void RemoveItem (vtItem *item)
 
uint NumItems ()
 
virtual vtItemNewItem ()
 
vtItemGetItem (int i)
 
vtItemFindItemByName (const char *name)
 
vtItemFindItemByType (const char *type, const char *subtype)
 
vtString GetFilename ()
 

Protected Attributes

vtArray< vtItem * > m_items
 
vtString m_strFilename
 

Detailed Description

The vtContentManager class keeps a list of 3d models, along with information about what they are and how they should be loaded. It consists of a set of Content Items (vtItem) which each represent a particular object, which in turn consist of Models (vtModel) which are a particular 3D geometry for that Item. An Item can have several Models which represent different levels of detail (LOD).

To load a set of content from a file, first create a vtContentManager object, then call ReadXML() with the name of name of a VT Content file (.vtco).

Member Function Documentation

void vtContentManager::ReadXML ( const char *  filename)

Read content items from an XML file.

There is no return value because if there is an error, an xh_io_exception will be thrown.

Parameters
filenameA string containing the file path.
void vtContentManager::WriteXML ( const char *  filename) const

Write content items to an XML file.

There is no return value because if there is an error, an xh_io_exception will be thrown.

Parameters
filenameA string containing the file path.