- Cal3D 0.11 API Reference -

Public Member Functions | Protected Attributes | List of all members
CalPhysique Class Reference
Inheritance diagram for CalPhysique:
CalPhysiqueDualQuat

Public Member Functions

 CalPhysique (CalModel *pModel)
 Constructs the physique instance. More...
 
int calculateTangentSpaces (CalSubmesh *pSubmesh, int mapId, float *pTangentSpaceBuffer, int stride=0) const
 Calculates the transformed tangent space data. More...
 
virtual int calculateNormals (CalSubmesh *pSubmesh, float *pNormalBuffer, int stride=0) const
 Calculates the transformed normal data. More...
 
virtual int calculateVertices (CalSubmesh *pSubmesh, float *pVertexBuffer, int stride=0) const
 Calculates the transformed vertex data. More...
 
CalVector calculateVertex (CalSubmesh *pSubmesh, int vertexId)
 Calculates one transformed vertex. More...
 
virtual int calculateVerticesAndNormals (CalSubmesh *pSubmesh, float *pVertexBuffer, int stride=0) const
 Calculates the transformed vertex data. More...
 
virtual int calculateVerticesNormalsAndTexCoords (CalSubmesh *pSubmesh, float *pVertexBuffer, int NumTexCoords=1) const
 Calculates the transformed vertex data. More...
 
void update ()
 Updates all the internally handled attached meshes. More...
 
void setNormalization (bool normalize)
 Sets the normalization flag to true or false. More...
 
void setAxisFactorX (float factor)
 
void setAxisFactorY (float factor)
 
void setAxisFactorZ (float factor)
 

Protected Attributes

CalModelm_pModel
 
bool m_Normalize
 
float m_axisFactorX
 
float m_axisFactorY
 
float m_axisFactorZ
 

Constructor & Destructor Documentation

◆ CalPhysique()

CalPhysique::CalPhysique ( CalModel pModel)

Constructs the physique instance.

This function is the default constructor of the physique instance.

Member Function Documentation

◆ calculateNormals()

int CalPhysique::calculateNormals ( CalSubmesh pSubmesh,
float *  pNormalBuffer,
int  stride = 0 
) const
virtual

Calculates the transformed normal data.

This function calculates and returns the transformed normal data of a specific submesh.

Parameters
pSubmeshA pointer to the submesh from which the normal data should be calculated and returned.
pNormalBufferA pointer to the user-provided buffer where the normal data is written to.
Returns
The number of normals written to the buffer.

Reimplemented in CalPhysiqueDualQuat.

◆ calculateTangentSpaces()

int CalPhysique::calculateTangentSpaces ( CalSubmesh pSubmesh,
int  mapId,
float *  pTangentSpaceBuffer,
int  stride = 0 
) const

Calculates the transformed tangent space data.

This function calculates and returns the transformed tangent space data of a specific submesh.

Parameters
pSubmeshA pointer to the submesh from which the tangent space data should be calculated and returned.
mapId
pTangentSpaceBufferA pointer to the user-provided buffer where the tangent space data is written to.
Returns
The number of tangent spaces written to the buffer.

◆ calculateVertex()

CalVector CalPhysique::calculateVertex ( CalSubmesh pSubmesh,
int  vertexId 
)

Calculates one transformed vertex.

This function calculates and returns a transformed vertex of a specific submesh.

Parameters
pSubmeshA pointer to the submesh from which the vertex should be calculated and returned.
vertexIdThe id of the vertex that should be transformed.
Returns
The number of vertices written to the buffer.

◆ calculateVertices()

int CalPhysique::calculateVertices ( CalSubmesh pSubmesh,
float *  pVertexBuffer,
int  stride = 0 
) const
virtual

Calculates the transformed vertex data.

This function calculates and returns the transformed vertex data of a specific submesh.

Parameters
pSubmeshA pointer to the submesh from which the vertex data should be calculated and returned.
pVertexBufferA pointer to the user-provided buffer where the vertex data is written to.
Returns
The number of vertices written to the buffer.

Reimplemented in CalPhysiqueDualQuat.

◆ calculateVerticesAndNormals()

int CalPhysique::calculateVerticesAndNormals ( CalSubmesh pSubmesh,
float *  pVertexBuffer,
int  stride = 0 
) const
virtual

Calculates the transformed vertex data.

This function calculates and returns the transformed vertex and the transformed normal datadata of a specific submesh.

Parameters
pSubmeshA pointer to the submesh from which the vertex data should be calculated and returned.
pVertexBufferA pointer to the user-provided buffer where the vertex data is written to.
Returns
The number of vertices written to the buffer.

Reimplemented in CalPhysiqueDualQuat.

◆ calculateVerticesNormalsAndTexCoords()

int CalPhysique::calculateVerticesNormalsAndTexCoords ( CalSubmesh pSubmesh,
float *  pVertexBuffer,
int  NumTexCoords = 1 
) const
virtual

Calculates the transformed vertex data.

This function calculates and returns the transformed vertex, the transformed normal data and the texture coords of a specific submesh.

Parameters
pSubmeshA pointer to the submesh from which the vertex data should be calculated and returned.
pVertexBufferA pointer to the user-provided buffer where the vertex data is written to.
NumTexCoordsA integer with the number of texture coords
Returns
The number of vertices written to the buffer.

Reimplemented in CalPhysiqueDualQuat.

◆ setNormalization()

void CalPhysique::setNormalization ( bool  normalize)

Sets the normalization flag to true or false.

This function sets the normalization flag on or off. If off, the normals calculated by Cal3D will not be normalized. Instead, this transform is left up to the user.

◆ update()

void CalPhysique::update ( )

Updates all the internally handled attached meshes.

This function updates all the attached meshes of the model that are handled internally.


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

Generated by The Cal3D Team with Doxygen 1.8.14