- Cal3D 0.11 API Reference -

Classes | Public Types | Public Member Functions | List of all members
CalCoreSubmesh Class Reference

Classes

struct  Face
 
struct  Influence
 
struct  PhysicalProperty
 
struct  Spring
 The core submesh Spring. More...
 
struct  TangentSpace
 
struct  TextureCoordinate
 
struct  Vertex
 

Public Types

typedef std::vector< CalCoreSubMorphTarget * > CoreSubMorphTargetVector
 
typedef std::vector< FaceVectorFace
 
typedef std::vector< PhysicalPropertyVectorPhysicalProperty
 
typedef std::vector< SpringVectorSpring
 
typedef std::vector< TangentSpaceVectorTangentSpace
 
typedef std::vector< TextureCoordinateVectorTextureCoordinate
 
typedef std::vector< VectorTangentSpace > VectorVectorTangentSpace
 
typedef std::vector< VectorTextureCoordinate > VectorVectorTextureCoordinate
 
typedef std::vector< VertexVectorVertex
 
typedef std::vector< InfluenceVectorInfluence
 

Public Member Functions

 CalCoreSubmesh ()
 Constructs the core submesh instance.
 
 ~CalCoreSubmesh ()
 Destructs the core submesh instance.
 
int getCoreMaterialThreadId () const
 Returns the ID of the core material thread.
 
int getFaceCount () const
 Returns the number of faces.
 
unsigned int size ()
 
unsigned int sizeWithoutSubMorphTargets ()
 
int getLodCount () const
 Returns the number of LOD steps.
 
int getSpringCount () const
 Returns the number of springs.
 
bool hasNonWhiteVertexColors ()
 
std::vector< Face > & getVectorFace ()
 Returns the face vector.
 
const std::vector< Face > & getVectorFace () const
 Returns the face vector.
 
std::vector< PhysicalProperty > & getVectorPhysicalProperty ()
 Returns the physical property vector.
 
const std::vector< PhysicalProperty > & getVectorPhysicalProperty () const
 Returns the physical property vector.
 
std::vector< Spring > & getVectorSpring ()
 Returns the spring vector.
 
const std::vector< Spring > & getVectorSpring () const
 Returns the spring vector.
 
std::vector< std::vector< TangentSpace > > & getVectorVectorTangentSpace ()
 Returns the tangent space vector-vector.
 
const std::vector< std::vector< TangentSpace > > & getVectorVectorTangentSpace () const
 Returns the tangent space vector-vector.
 
std::vector< std::vector< TextureCoordinate > > & getVectorVectorTextureCoordinate ()
 Returns the texture coordinate vector-vector.
 
const std::vector< std::vector< TextureCoordinate > > & getVectorVectorTextureCoordinate () const
 Returns the texture coordinate vector-vector.
 
std::vector< Vertex > & getVectorVertex ()
 Returns the vertex vector.
 
const std::vector< Vertex > & getVectorVertex () const
 Returns the vertex vector.
 
int getVertexCount () const
 Returns the number of vertices.
 
bool isTangentsEnabled (int mapId) const
 Returns true if tangent vectors are enabled.
 
bool enableTangents (int mapId, bool enabled)
 Enables (and calculates) or disables the storage of tangent spaces.
 
bool reserve (int vertexCount, int textureCoordinateCount, int faceCount, int springCount)
 Reserves memory for the vertices, faces and texture coordinates.
 
void setCoreMaterialThreadId (int coreMaterialThreadId)
 Sets the ID of the core material thread.
 
bool setFace (int faceId, const Face &face)
 Sets a specified face.
 
void setLodCount (int lodCount)
 Sets the number of LOD steps.
 
bool setPhysicalProperty (int vertexId, const PhysicalProperty &physicalProperty)
 Sets a specified physical property.
 
bool setSpring (int springId, const Spring &spring)
 Sets a specified spring.
 
bool setTangentSpace (int vertexId, int textureCoordinateId, const CalVector &tangent, float crossFactor)
 Sets the tangent vector associated with a specified texture coordinate pair.
 
bool setTextureCoordinate (int vertexId, int textureCoordinateId, const TextureCoordinate &textureCoordinate)
 Sets a specified texture coordinate.
 
bool setVertex (int vertexId, const Vertex &vertex)
 Sets a specified vertex.
 
void setHasNonWhiteVertexColors (bool p)
 
int addCoreSubMorphTarget (CalCoreSubMorphTarget *pCoreSubMorphTarget)
 Adds a core sub morph target.
 
CalCoreSubMorphTargetgetCoreSubMorphTarget (int id)
 Provides access to a core sub morph target.
 
const CalCoreSubMorphTargetgetCoreSubMorphTarget (int id) const
 Provides access to a core sub morph target.
 
int getCoreSubMorphTargetCount () const
 Returns the number of core sub morph targets.
 
std::vector< CalCoreSubMorphTarget * > & getVectorCoreSubMorphTarget ()
 Returns the core sub morph target vector.
 
const std::vector< CalCoreSubMorphTarget * > & getVectorCoreSubMorphTarget () const
 Returns the core sub morph target vector.
 
void scale (float factor)
 Scale the Submesh.
 
void setSubMorphTargetGroupIndexArray (unsigned int len, unsigned int const *indexArray)
 
unsigned int subMorphTargetGroupIndex (int subMorphTargetId)
 

Constructor & Destructor Documentation

◆ CalCoreSubmesh()

CalCoreSubmesh::CalCoreSubmesh ( )

Constructs the core submesh instance.

This function is the default constructor of the core submesh instance.

◆ ~CalCoreSubmesh()

CalCoreSubmesh::~CalCoreSubmesh ( )

Destructs the core submesh instance.

This function is the destructor of the core submesh instance.

Member Function Documentation

◆ addCoreSubMorphTarget()

int CalCoreSubmesh::addCoreSubMorphTarget ( CalCoreSubMorphTarget * pCoreSubMorphTarget)

Adds a core sub morph target.

This function adds a core sub morph target to the core sub mesh instance.

Parameters
pCoreSubMorphTargetA pointer to the core sub morph target that should be added.
Returns
One of the following values:
  • the assigned sub morph target ID of the added core sub morph target
  • -1 if an error happened

◆ enableTangents()

bool CalCoreSubmesh::enableTangents ( int mapId,
bool enabled )

Enables (and calculates) or disables the storage of tangent spaces.

This function enables or disables the storage of tangent space bases.

◆ getCoreMaterialThreadId()

int CalCoreSubmesh::getCoreMaterialThreadId ( ) const

Returns the ID of the core material thread.

This function returns the ID of the core material thread of this core submesh instance.

Returns
The ID of the core material thread.

◆ getCoreSubMorphTarget() [1/2]

CalCoreSubMorphTarget * CalCoreSubmesh::getCoreSubMorphTarget ( int id)

Provides access to a core sub morph target.

This function returns the core sub morph target with the given ID.

Parameters
idThe ID of the core sub morph target that should be returned.
Returns
One of the following values:
  • a pointer to the core sub morph target
  • 0 if an error happened

◆ getCoreSubMorphTarget() [2/2]

const CalCoreSubMorphTarget * CalCoreSubmesh::getCoreSubMorphTarget ( int id) const

Provides access to a core sub morph target.

This function returns the core sub morph target with the given ID.

Parameters
idThe ID of the core sub morph target that should be returned.
Returns
One of the following values:
  • a pointer to the core sub morph target
  • 0 if an error happened

◆ getCoreSubMorphTargetCount()

int CalCoreSubmesh::getCoreSubMorphTargetCount ( ) const

Returns the number of core sub morph targets.

This function returns the number of core sub morph targets in the core sub mesh instance.

Returns
The number of core sub morph targets.

◆ getFaceCount()

int CalCoreSubmesh::getFaceCount ( ) const

Returns the number of faces.

This function returns the number of faces in the core submesh instance.

Returns
The number of faces.

◆ getLodCount()

int CalCoreSubmesh::getLodCount ( ) const

Returns the number of LOD steps.

This function returns the number of LOD steps in the core submesh instance.

Returns
The number of LOD steps.

◆ getSpringCount()

int CalCoreSubmesh::getSpringCount ( ) const

Returns the number of springs.

This function returns the number of springs in the core submesh instance.

Returns
The number of springs.

◆ getVectorCoreSubMorphTarget() [1/2]

std::vector< CalCoreSubMorphTarget * > & CalCoreSubmesh::getVectorCoreSubMorphTarget ( )

Returns the core sub morph target vector.

This function returns the vector that contains all core sub morph target of the core submesh instance.

Returns
A reference to the core sub morph target vector.

◆ getVectorCoreSubMorphTarget() [2/2]

const std::vector< CalCoreSubMorphTarget * > & CalCoreSubmesh::getVectorCoreSubMorphTarget ( ) const

Returns the core sub morph target vector.

This function returns the vector that contains all core sub morph target of the core submesh instance.

Returns
A reference to the core sub morph target vector.

◆ getVectorFace() [1/2]

std::vector< CalCoreSubmesh::Face > & CalCoreSubmesh::getVectorFace ( )

Returns the face vector.

This function returns the vector that contains all faces of the core submesh instance.

Returns
A reference to the face vector.

◆ getVectorFace() [2/2]

const std::vector< CalCoreSubmesh::Face > & CalCoreSubmesh::getVectorFace ( ) const

Returns the face vector.

This function returns the vector that contains all faces of the core submesh instance.

Returns
A reference to the face vector.

◆ getVectorPhysicalProperty() [1/2]

std::vector< CalCoreSubmesh::PhysicalProperty > & CalCoreSubmesh::getVectorPhysicalProperty ( )

Returns the physical property vector.

This function returns the vector that contains all physical properties of the core submesh instance.

Returns
A reference to the physical property vector.

◆ getVectorPhysicalProperty() [2/2]

const std::vector< CalCoreSubmesh::PhysicalProperty > & CalCoreSubmesh::getVectorPhysicalProperty ( ) const

Returns the physical property vector.

This function returns the vector that contains all physical properties of the core submesh instance.

Returns
A reference to the physical property vector.

◆ getVectorSpring() [1/2]

std::vector< CalCoreSubmesh::Spring > & CalCoreSubmesh::getVectorSpring ( )

Returns the spring vector.

This function returns the vector that contains all springs of the core submesh instance.

Returns
A reference to the spring vector.

◆ getVectorSpring() [2/2]

const std::vector< CalCoreSubmesh::Spring > & CalCoreSubmesh::getVectorSpring ( ) const

Returns the spring vector.

This function returns the vector that contains all springs of the core submesh instance.

Returns
A reference to the spring vector.

◆ getVectorVectorTangentSpace() [1/2]

std::vector< std::vector< CalCoreSubmesh::TangentSpace > > & CalCoreSubmesh::getVectorVectorTangentSpace ( )

Returns the tangent space vector-vector.

This function returns the vector that contains all tangent space bases of the core submesh instance. This vector contains another vector because there can be more than one texture map at each vertex.

Returns
A reference to the tangent space vector-vector.

◆ getVectorVectorTangentSpace() [2/2]

const std::vector< std::vector< CalCoreSubmesh::TangentSpace > > & CalCoreSubmesh::getVectorVectorTangentSpace ( ) const

Returns the tangent space vector-vector.

This function returns the vector that contains all tangent space bases of the core submesh instance. This vector contains another vector because there can be more than one texture map at each vertex.

Returns
A reference to the tangent space vector-vector.

◆ getVectorVectorTextureCoordinate() [1/2]

std::vector< std::vector< CalCoreSubmesh::TextureCoordinate > > & CalCoreSubmesh::getVectorVectorTextureCoordinate ( )

Returns the texture coordinate vector-vector.

This function returns the vector that contains all texture coordinate vectors of the core submesh instance. This vector contains another vector because there can be more than one texture map at each vertex.

Returns
A reference to the texture coordinate vector-vector.

◆ getVectorVectorTextureCoordinate() [2/2]

const std::vector< std::vector< CalCoreSubmesh::TextureCoordinate > > & CalCoreSubmesh::getVectorVectorTextureCoordinate ( ) const

Returns the texture coordinate vector-vector.

This function returns the vector that contains all texture coordinate vectors of the core submesh instance. This vector contains another vector because there can be more than one texture map at each vertex.

Returns
A reference to the texture coordinate vector-vector.

◆ getVectorVertex() [1/2]

std::vector< CalCoreSubmesh::Vertex > & CalCoreSubmesh::getVectorVertex ( )

Returns the vertex vector.

This function returns the vector that contains all vertices of the core submesh instance.

Returns
A reference to the vertex vector.

◆ getVectorVertex() [2/2]

const std::vector< CalCoreSubmesh::Vertex > & CalCoreSubmesh::getVectorVertex ( ) const

Returns the vertex vector.

This function returns the vector that contains all vertices of the core submesh instance.

Returns
A reference to the vertex vector.

◆ getVertexCount()

int CalCoreSubmesh::getVertexCount ( ) const

Returns the number of vertices.

This function returns the number of vertices in the core submesh instance.

Returns
The number of vertices.

◆ isTangentsEnabled()

bool CalCoreSubmesh::isTangentsEnabled ( int mapId) const

Returns true if tangent vectors are enabled.

This function returns true if the core submesh contains tangent vectors.

Returns
True if tangent vectors are enabled.

◆ reserve()

bool CalCoreSubmesh::reserve ( int vertexCount,
int textureCoordinateCount,
int faceCount,
int springCount )

Reserves memory for the vertices, faces and texture coordinates.

This function reserves memory for the vertices, faces, texture coordinates and springs of the core submesh instance.

Parameters
vertexCountThe number of vertices that this core submesh instance should be able to hold.
textureCoordinateCountThe number of texture coordinates that this core submesh instance should be able to hold.
faceCountThe number of faces that this core submesh instance should be able to hold.
springCountThe number of springs that this core submesh instance should be able to hold.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ scale()

void CalCoreSubmesh::scale ( float factor)

Scale the Submesh.

This function rescale all the data that are in the core submesh instance.

Parameters
factorA float with the scale factor

◆ setCoreMaterialThreadId()

void CalCoreSubmesh::setCoreMaterialThreadId ( int coreMaterialThreadId)

Sets the ID of the core material thread.

This function sets the ID of the core material thread of the core submesh instance.

Parameters
coreMaterialThreadIdThe ID of the core material thread that should be set.

◆ setFace()

bool CalCoreSubmesh::setFace ( int faceId,
const Face & face )

Sets a specified face.

This function sets a specified face in the core submesh instance.

Parameters
faceIdThe ID of the face.
faceThe face that should be set.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ setLodCount()

void CalCoreSubmesh::setLodCount ( int lodCount)

Sets the number of LOD steps.

This function sets the number of LOD steps of the core submesh instance.

Parameters
lodCountThe number of LOD steps that should be set.

◆ setPhysicalProperty()

bool CalCoreSubmesh::setPhysicalProperty ( int vertexId,
const PhysicalProperty & physicalProperty )

Sets a specified physical property.

This function sets a specified physical property in the core submesh instance.

Parameters
vertexIdThe ID of the vertex.
physicalPropertyThe physical property that should be set.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ setSpring()

bool CalCoreSubmesh::setSpring ( int springId,
const Spring & spring )

Sets a specified spring.

This function sets a specified spring in the core submesh instance.

Parameters
springIdThe ID of the spring.
springThe spring that should be set.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ setTangentSpace()

bool CalCoreSubmesh::setTangentSpace ( int vertexId,
int textureCoordinateId,
const CalVector & tangent,
float crossFactor )

Sets the tangent vector associated with a specified texture coordinate pair.

This function sets the tangent vector associated with a specified texture coordinate pair in the core submesh instance.

Parameters
vertexIdThe ID of the vertex.
textureCoordinateIdThe ID of the texture coordinate channel.
tangentThe tangent vector that should be stored.
crossFactorThe cross-product factor that should be stored.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ setTextureCoordinate()

bool CalCoreSubmesh::setTextureCoordinate ( int vertexId,
int textureCoordinateId,
const TextureCoordinate & textureCoordinate )

Sets a specified texture coordinate.

This function sets a specified texture coordinate in the core submesh instance.

Parameters
vertexIdThe ID of the vertex.
textureCoordinateIdThe ID of the texture coordinate.
textureCoordinateThe texture coordinate that should be set.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ setVertex()

bool CalCoreSubmesh::setVertex ( int vertexId,
const Vertex & vertex )

Sets a specified vertex.

This function sets a specified vertex in the core submesh instance.

Parameters
vertexIdThe ID of the vertex.
vertexThe vertex that should be set.
Returns
One of the following values:
  • true if successful
  • false if an error happened

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

Generated by The Cal3D Team with Doxygen 1.10.0