- Cal3D 0.9 API Reference -

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

CalPhysique Class Reference

The physique class. More...

#include <physique.h>

List of all members.

Public Member Functions

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

Public Attributes

CalModelm_pModel
bool m_Normalize


Detailed Description

The physique class.


Constructor & Destructor Documentation

CalPhysique::CalPhysique  ) 
 

Constructs the physique instance.

This function is the default constructor of the physique instance.

CalPhysique::~CalPhysique  )  [virtual]
 

Destructs the physique instance.

This function is the destructor of the physique instance.


Member Function Documentation

int CalPhysique::calculateNormals CalSubmesh pSubmesh,
float *  pNormalBuffer
 

Calculates the transformed normal data.

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

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

int CalPhysique::calculateTangentSpaces CalSubmesh pSubmesh,
int  mapId,
float *  pTangentSpaceBuffer
 

Calculates the transformed tangent space data.

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

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

CalVector CalPhysique::calculateVertex CalSubmesh pSubmesh,
int  vertexId
 

Calculates one transformed vertex.

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

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

int CalPhysique::calculateVertices CalSubmesh pSubmesh,
float *  pVertexBuffer
 

Calculates the transformed vertex data.

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

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

int CalPhysique::calculateVerticesAndNormals CalSubmesh pSubmesh,
float *  pVertexBuffer
 

Calculates the transformed vertex data.

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

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

int CalPhysique::calculateVerticesNormalsAndTexCoords CalSubmesh pSubmesh,
float *  pVertexBuffer,
int  NumTexCoords = 1
 

Calculates the transformed vertex data.

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

Parameters:
pSubmesh A pointer to the submesh from which the vertex data should be calculated and returned.
pVertexBuffer A pointer to the user-provided buffer where the vertex data is written to.
NumTexCoords A integer with the number of texture coords
Returns:
The number of vertices written to the buffer.

bool CalPhysique::create CalModel pModel  ) 
 

Creates the physique instance.

This function creates the physique instance.

Parameters:
pModel A pointer to the model that should be managed with this physique instance.
Returns:
One of the following values:
  • true if successful
  • false if an error happend

void CalPhysique::destroy  ) 
 

Destroys the physique instance.

This function destroys all data stored in the physique instance and frees all allocated memory.

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.

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 at Thu Dec 2 19:59:20 2004 by The Cal3D Team with doxygen 1.3.9.1 © 1997-2001 Dimitri van Heesch