Cutout Vis2012
TUWienVisualisierung2(SS2012)-AdaptiveCutaways
 All Classes Namespaces Functions Pages
Public Member Functions | List of all members
Commander Class Reference

#include <Commander.h>

Public Member Functions

 Commander (Scene *scene)
 
MeshloadModel (const string &fileName)
 
SceneNodeaddInstanceToScene (Mesh *mesh)
 
void saveScene (const string &fileName)
 
void loadScene (const string &fileName)
 
const string & getMeshName (Mesh *mesh)
 

Detailed Description

Provides methods to load and save scenes and models.

Constructor & Destructor Documentation

Commander::Commander ( Scene scene)

Inits the Commander object with a scene.

Member Function Documentation

SceneNode * Commander::addInstanceToScene ( Mesh mesh)

Creates a new SceneNode and appends a new MeshInstance to it. Appends the scene node to the root of the scene and returns it. The scene node has an SRTTransform as its local transform.

const string & Commander::getMeshName ( Mesh mesh)

Returns the file name that is associated with mesh. If none is, returns an empty string.

Mesh * Commander::loadModel ( const string &  fileName)

If the COLLADA model at fileName has been loaded before, returns the mesh. Otherwise loads the model and returns it.

Parameters
fileNamepath relative to the models/ folder. Must be a COLLADA *.dae model.
void Commander::loadScene ( const string &  fileName)

Clears the current scene and loads a previously saved scene from file fileName in the scenes/ folder.

void Commander::saveScene ( const string &  fileName)

Saves the current scene configuration with its scene nodes and mesh instances into the scenes/ folder and the provided fileName.


The documentation for this class was generated from the following files: