Classes | Public Types | Public Member Functions

xl7::direct3d::models::ModelDescription Class Reference

#include <ModelDescription.h>

List of all members.

Classes

class  AssignmentComparer
struct  IndexFeature
class  WeightComparer

Public Types

typedef std::pair< Vertex, IndexAuxVertexEntry
typedef std::map< Vertex, IndexAuxVertices
typedef std::map< Vertex,
Index >::iterator 
AuxVertexIterator
typedef std::vector< VertexVertices
typedef std::vector< VertexVertexIterator
typedef std::vector< TriangleTriangles
typedef std::vector< Triangle >
::iterator 
TriangleIterator
typedef std::vector< IndexIndices
typedef std::vector< Index >
::iterator 
IndexIterator
typedef std::vector
< cl7::string_type
Textures
typedef std::vector
< cl7::string_type >::iterator 
TextureIterator
typedef std::vector
< materials::Material
Materials
typedef std::vector
< materials::Material >
::iterator 
MaterialIterator
typedef std::vector< JointJoints
typedef std::vector< Joint >
::iterator 
JointIterator
typedef std::vector< AssignmentAssignments
typedef std::vector
< Assignment >::iterator 
AssignmentIterator
typedef std::vector
< ConditionNode
ConditionNodes
typedef std::vector
< ConditionNode >::iterator 
ConditionNodeIterator
typedef std::vector
< TransformNode
TransformNodes
typedef std::vector
< TransformNode >::iterator 
TransformNodeIterator

Public Member Functions

 ModelDescription (void)
 ~ModelDescription (void)
 ModelDescription (const ModelDescription &rhs)
ModelDescriptionoperator= (const ModelDescription &rhs)
bool IsLocked () const
const AuxVerticesGetAuxVertices () const
const VerticesGetVertices () const
const TrianglesGetTriangles () const
const IndicesGetIndices () const
const TexturesGetTextures () const
const MaterialsGetMaterials () const
const JointsGetJoints () const
const AssignmentsGetAssignments () const
const ConditionNodesGetConditionNodes () const
const TransformNodesGetTransformNodes () const
bool LoadFromFile (const cl7::string_type &file_name)
bool LoadFrom (io::IRom &rom, const cl7::string_type &rom_name=TEXT(""))
bool SaveToFile (const cl7::string_type &file_name)
bool SaveTo (io::IFile &file, const cl7::string_type &file_name=TEXT(""))
void Log () const
bool Lock ()
Index AddVertex (const Vertex &vertex)
Index AddVertex (const Vertex &vertex, const cl7::string_type &joint_identifier, float bias)
Index AddTriangle (const Triangle &triangle, const cl7::string_type &texture_identifier, const materials::Material &material)
Index AddJoint (const cl7::string_type &joint_identifier, const ml7::Vector3 &position)
Index AddJoint (const cl7::string_type &joint_identifier, const ml7::Vector3 &position, const cl7::string_type &parent_identifier)
Index FindVertex (const Vertex &vertex) const
Index FindTexture (const cl7::string_type &texture_identifier) const
Index FindMaterial (const materials::Material &material) const
Index FindJoint (const cl7::string_type &joint_identifier) const
Index FindNode (const cl7::string_type &texture_identifier, const materials::Material &material) const

Member Typedef Documentation


Constructor & Destructor Documentation

xl7::direct3d::models::ModelDescription::ModelDescription ( void   ) 

Default constructor.

xl7::direct3d::models::ModelDescription::~ModelDescription ( void   ) 

Destructor.

xl7::direct3d::models::ModelDescription::ModelDescription ( const ModelDescription rhs  ) 

Copy constructor.


Member Function Documentation

Index xl7::direct3d::models::ModelDescription::AddJoint ( const cl7::string_type joint_identifier,
const ml7::Vector3 position 
)

Adds a new joint and returns its index. If there is already a joint with the given identifier name, the existent joint will be updated. The function fails if the model description has been locked.

Index xl7::direct3d::models::ModelDescription::AddJoint ( const cl7::string_type joint_identifier,
const ml7::Vector3 position,
const cl7::string_type parent_identifier 
)

Adds a new joint (to an existent parent joint) and returns its index. If there is already a joint with the given identifier name, the existent joint will be updated. The parent joint will be created as well, if there is no joint registered with the given identifier name. The function fails if the model description has been locked.

Index xl7::direct3d::models::ModelDescription::AddTriangle ( const Triangle triangle,
const cl7::string_type texture_identifier,
const materials::Material material 
)

Adds a new triangle and returns its index. The triangle is inserted into the list of (render) nodes in consideration of its texture and material. The function fails if the model description has been locked.

Index xl7::direct3d::models::ModelDescription::AddVertex ( const Vertex vertex  ) 

Adds a new vertex and returns its index. If the given vertex already exists, the vertex will not be added again. The function fails if the model description has been locked.

Index xl7::direct3d::models::ModelDescription::AddVertex ( const Vertex vertex,
const cl7::string_type joint_identifier,
float  bias 
)

Adds a new vertex assigned to a joint and returns its index. If the given vertex already exists, the vertex will not be added again. The function fails if the model description has been locked.

Index xl7::direct3d::models::ModelDescription::FindJoint ( const cl7::string_type joint_identifier  )  const

Searches for a joint with the given identifier name and returns its index.

Index xl7::direct3d::models::ModelDescription::FindMaterial ( const materials::Material material  )  const

Searches for a given material and returns its index.

Index xl7::direct3d::models::ModelDescription::FindNode ( const cl7::string_type texture_identifier,
const materials::Material material 
) const

Searches for a (render) node by comparing the given texture and material.

Index xl7::direct3d::models::ModelDescription::FindTexture ( const cl7::string_type texture_identifier  )  const

Searches for a given texture and returns its index.

Index xl7::direct3d::models::ModelDescription::FindVertex ( const Vertex vertex  )  const

Searches for a given vertex and returns its index.

const Assignments* xl7::direct3d::models::ModelDescription::GetAssignments (  )  const [inline]

Returns the (weighted) assignments of vertices to joints.

const AuxVertices* xl7::direct3d::models::ModelDescription::GetAuxVertices (  )  const [inline]

Returns the auxiliary vertices of the model. (This should be uninteresting for most of the people out there. This list will have 0 elements since the model is locked.)

const ConditionNodes* xl7::direct3d::models::ModelDescription::GetConditionNodes (  )  const [inline]

Returns the condition nodes of the model.

const Indices* xl7::direct3d::models::ModelDescription::GetIndices (  )  const [inline]

Returns the (sorted) indices of the model (referencing one vertex each).

const Joints* xl7::direct3d::models::ModelDescription::GetJoints (  )  const [inline]

Returns the joints of the model.

const Materials* xl7::direct3d::models::ModelDescription::GetMaterials (  )  const [inline]

Returns the materials of the model.

const Textures* xl7::direct3d::models::ModelDescription::GetTextures (  )  const [inline]

Returns the textures of the model (file names to them).

const TransformNodes* xl7::direct3d::models::ModelDescription::GetTransformNodes (  )  const [inline]

Returns the transform nodes of the model.

const Triangles* xl7::direct3d::models::ModelDescription::GetTriangles (  )  const [inline]

Returns the triangles of the model (referencing three vertices each).

const Vertices* xl7::direct3d::models::ModelDescription::GetVertices (  )  const [inline]

Returns the (sorted) vertices of the model.

bool xl7::direct3d::models::ModelDescription::IsLocked (  )  const [inline]

Returns the flag specifying whether this model description has been locked or still can be edited.

bool xl7::direct3d::models::ModelDescription::LoadFrom ( io::IRom rom,
const cl7::string_type rom_name = TEXT("") 
)

Loads the model description from any rom.

bool xl7::direct3d::models::ModelDescription::LoadFromFile ( const cl7::string_type file_name  ) 

Loads the model description from a file in the file system.

bool xl7::direct3d::models::ModelDescription::Lock (  ) 

Locks this model description. After the model description has been locked, there is no way to edit or unlock it anymore.

void xl7::direct3d::models::ModelDescription::Log (  )  const

Prints out some stuff about this model description.

ModelDescription & xl7::direct3d::models::ModelDescription::operator= ( const ModelDescription rhs  ) 

Copy assignment operator.

bool xl7::direct3d::models::ModelDescription::SaveTo ( io::IFile file,
const cl7::string_type file_name = TEXT("") 
)

Saves the model description to any file.

bool xl7::direct3d::models::ModelDescription::SaveToFile ( const cl7::string_type file_name  ) 

Saves the model description to a file in the file system.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines