Neo  0.5.0
Developer Documentation
Neo::Mesh Class Reference

The Mesh class contains the implementation of a generic (i.e. file format agnostic) 3D mesh with support for armature animation, material animation and multitexturing. More...

#include <Mesh.h>

Public Member Functions

 Mesh (void)
 
 ~Mesh (void)
 
void destroy (void)
 Destroys the mesh instance and frees all allocated memory. More...
 
void clear (void)
 
void clearAnimsRanges (void)
 
AnimRangeallocAnimsRanges (unsigned int size)
 
unsigned int getAnimsRangesNumber (void)
 Returns the number of animation ranges. More...
 
AnimRangegetAnimsRanges (void)
 Returns the array of animation ranges. More...
 
void setArmatureAnimRef (ArmatureAnimRef *armatureAnimRef)
 Sets the armature reference. More...
 
ArmatureAnimRefgetArmatureAnimRef (void)
 Returns the current armature animation reference. More...
 
ArmatureAnimgetArmatureAnim (void)
 
void setTexturesAnimRef (TexturesAnimRef *texturesAnimRef)
 
TexturesAnimRefgetTexturesAnimRef (void)
 
TexturesAnimgetTexturesAnim (void)
 
void setMaterialsAnimRef (MaterialsAnimRef *materialsAnimRef)
 Sets the material animation reference. More...
 
MaterialsAnimRefgetMaterialsAnimRef (void)
 Returns the current material animation reference. More...
 
MaterialsAnimgetMaterialsAnim (void)
 
void clearArmature (void)
 
ArmaturecreateArmature (void)
 
ArmaturegetArmature (void)
 
void allocTextures (unsigned int size)
 
void clearTextures (void)
 
TextureaddNewTexture (TextureRef *texRef)
 
unsigned int getTexturesNumber (void)
 
TexturegetTexture (unsigned int id)
 
void allocMaterials (unsigned int size)
 Allocates enough memory for all materials. More...
 
void clearMaterials (void)
 Deletes all contained materials. More...
 
MaterialaddNewMaterial (void)
 Creates a new Material, adds it to the internal array and returns it. More...
 
unsigned int getMaterialsNumber (void)
 Returns the number of currently active materials. More...
 
MaterialgetMaterial (unsigned int id)
 Retrieves a specific material from the internal array. More...
 
void clearSubMeshs (void)
 
SubMeshallocSubMeshs (unsigned int size)
 
unsigned int getSubMeshsNumber (void)
 
SubMeshgetSubMeshs (void)
 
SubMeshgetSubMesh (size_t idx)
 
void updateBoundingBox (void)
 Recalculates the bounding box to contain all vertices of the mesh. More...
 
Box3dgetBoundingBox (void)
 Returns the current bounding box. More...
 

Static Public Member Functions

static MeshgetNew (void)
 Creates a new Mesh instance. More...
 

Detailed Description

The Mesh class contains the implementation of a generic (i.e. file format agnostic) 3D mesh with support for armature animation, material animation and multitexturing.

Constructor & Destructor Documentation

Neo::Mesh::Mesh ( void  )
Neo::Mesh::~Mesh ( void  )

Member Function Documentation

Material* Neo::Mesh::addNewMaterial ( void  )

Creates a new Material, adds it to the internal array and returns it.

Returns
The new Material.
Texture* Neo::Mesh::addNewTexture ( TextureRef texRef)
AnimRange* Neo::Mesh::allocAnimsRanges ( unsigned int  size)
void Neo::Mesh::allocMaterials ( unsigned int  size)

Allocates enough memory for all materials.

Parameters
sizeThe number of materials to allocate.
SubMesh* Neo::Mesh::allocSubMeshs ( unsigned int  size)
void Neo::Mesh::allocTextures ( unsigned int  size)
void Neo::Mesh::clear ( void  )
void Neo::Mesh::clearAnimsRanges ( void  )
void Neo::Mesh::clearArmature ( void  )
void Neo::Mesh::clearMaterials ( void  )

Deletes all contained materials.

void Neo::Mesh::clearSubMeshs ( void  )
void Neo::Mesh::clearTextures ( void  )
Armature* Neo::Mesh::createArmature ( void  )
void Neo::Mesh::destroy ( void  )

Destroys the mesh instance and frees all allocated memory.

AnimRange* Neo::Mesh::getAnimsRanges ( void  )
inline

Returns the array of animation ranges.

Returns
The array of animation ranges.
unsigned int Neo::Mesh::getAnimsRangesNumber ( void  )
inline

Returns the number of animation ranges.

Returns
The number animation ranges.
Armature* Neo::Mesh::getArmature ( void  )
inline
ArmatureAnim* Neo::Mesh::getArmatureAnim ( void  )
ArmatureAnimRef* Neo::Mesh::getArmatureAnimRef ( void  )
inline

Returns the current armature animation reference.

Returns
The armature animation reference.
See also
ArmatureAnimRef
Box3d* Neo::Mesh::getBoundingBox ( void  )
inline

Returns the current bounding box.

Returns
The bounding box.
See also
updateBoundingBox
Material* Neo::Mesh::getMaterial ( unsigned int  id)
inline

Retrieves a specific material from the internal array.

Parameters
idThe index to the array.
Returns
The material
MaterialsAnim* Neo::Mesh::getMaterialsAnim ( void  )
MaterialsAnimRef* Neo::Mesh::getMaterialsAnimRef ( void  )
inline

Returns the current material animation reference.

Returns
The material animation reference.
See also
MaterialsAnimRef
unsigned int Neo::Mesh::getMaterialsNumber ( void  )
inline

Returns the number of currently active materials.

Returns
The number of active materials.
static Mesh* Neo::Mesh::getNew ( void  )
static

Creates a new Mesh instance.

Used by the mesh factory class.

Returns
The new Mesh.
SubMesh* Neo::Mesh::getSubMesh ( size_t  idx)
inline
SubMesh* Neo::Mesh::getSubMeshs ( void  )
inline
unsigned int Neo::Mesh::getSubMeshsNumber ( void  )
inline
Texture* Neo::Mesh::getTexture ( unsigned int  id)
inline
TexturesAnim* Neo::Mesh::getTexturesAnim ( void  )
TexturesAnimRef* Neo::Mesh::getTexturesAnimRef ( void  )
inline
unsigned int Neo::Mesh::getTexturesNumber ( void  )
inline
void Neo::Mesh::setArmatureAnimRef ( ArmatureAnimRef armatureAnimRef)
inline

Sets the armature reference.

Parameters
armatureAnimRefThe new armature animation reference.
See also
ArmatureAnimRef
void Neo::Mesh::setMaterialsAnimRef ( MaterialsAnimRef materialsAnimRef)
inline

Sets the material animation reference.

Parameters
armatureAnimRefThe new material animation reference.
See also
MaterialsAnimRef
void Neo::Mesh::setTexturesAnimRef ( TexturesAnimRef texturesAnimRef)
inline
void Neo::Mesh::updateBoundingBox ( void  )

Recalculates the bounding box to contain all vertices of the mesh.


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