- Cal3D 0.11 API Reference - |
Classes | |
struct | Face |
struct | PhysicalProperty |
struct | TangentSpace |
Public Member Functions | |
CalSubmesh (CalCoreSubmesh *coreSubmesh) | |
CalCoreSubmesh * | getCoreSubmesh () |
Provides access to the core submesh. More... | |
const CalCoreSubmesh * | getCoreSubmesh () const |
Provides access to the core submesh. More... | |
int | getCoreMaterialId () const |
Returns the core material ID. More... | |
int | getFaceCount () const |
Returns the number of faces. More... | |
int | getFaces (CalIndex *pFaceBuffer) const |
Provides access to the face data. More... | |
std::vector< CalVector > & | getVectorNormal () |
Returns the normal vector. More... | |
const std::vector< CalVector > & | getVectorNormal () const |
Returns the normal vector. More... | |
std::vector< std::vector< TangentSpace > > & | getVectorVectorTangentSpace () |
Returns the tangent space vector-vector. More... | |
const std::vector< std::vector< TangentSpace > > & | getVectorVectorTangentSpace () const |
Returns the tangent space vector-vector. More... | |
std::vector< PhysicalProperty > & | getVectorPhysicalProperty () |
Returns the physical property vector. More... | |
const std::vector< PhysicalProperty > & | getVectorPhysicalProperty () const |
Returns the physical property vector. More... | |
std::vector< CalVector > & | getVectorVertex () |
Returns the vertex vector. More... | |
const std::vector< CalVector > & | getVectorVertex () const |
Returns the vertex vector. More... | |
int | getVertexCount () const |
Returns the number of vertices. More... | |
bool | hasInternalData () const |
Returns if the submesh instance handles vertex data internally. More... | |
void | disableInternalData () |
Disable internal data (and thus springs system) More... | |
void | setCoreMaterialId (int coreMaterialId) |
Sets the core material ID. More... | |
void | setLodLevel (float lodLevel) |
Sets the LOD level. More... | |
bool | isTangentsEnabled (int mapId) const |
Returns true if tangent vectors are enabled. More... | |
bool | enableTangents (int mapId, bool enabled) |
Enables (and calculates) or disables the storage of tangent spaces. More... | |
void | setMorphTargetWeight (int blendId, float weight) |
Sets weight of a morph target with the given id. More... | |
float | getMorphTargetWeight (int blendId) const |
Gets weight of a morph target with the given id. More... | |
void | setMorphTargetWeight (const unsigned int &morphName, float weight) |
Sets weight of a morph target with the given name. More... | |
int | getMorphTargetWeightCount () const |
Returns the number of weights. More... | |
bool | getMorphTargetWeight (const unsigned int &morphName, float *weightOut) |
Gets weight of a morph target with the given name. More... | |
void | getMorphIdAndWeightArray (MorphIdAndWeight *arrayResult, unsigned int *numMiawsResult, unsigned int maxMiaws) |
float | getBaseWeight () const |
Gets weight of the base vertices. More... | |
std::vector< float > & | getVectorMorphTargetWeight () |
Returns the morph target weight vector. More... | |
const std::vector< float > & | getVectorMorphTargetWeight () const |
Returns the morph target weight vector. More... | |
void | clearMorphTargetScales () |
Clears the scale of each morph target. More... | |
void | clearMorphTargetState (const unsigned int &morphName) |
void | blendMorphTargetScale (const unsigned int &morphName, float scale, float unrampedWeight, float rampValue, bool replace) |
Sets weight of a morph target with the given name. More... | |
void | setSubMorphTargetGroupAttenuatorArray (unsigned int len, int const *morphTargetIdArray) |
void | setSubMorphTargetGroupAttenuationArray (unsigned int len, float const *attenuationArray) |
void CalSubmesh::blendMorphTargetScale | ( | const unsigned int & | morphName, |
float | scale, | ||
float | unrampedWeight, | ||
float | rampValue, | ||
bool | replace | ||
) |
Sets weight of a morph target with the given name.
morphName | The morph target name. |
scale | Scale from -inf to inf scales magnitude. |
unrampedWeight | The blending weight, not incorporating ramp value |
rampValue | Amount to attenuate weight when ramping in/out the animation. |
replace | If true, all blends except one Replace blend will have their weight attenuated by 1 - rampValue of that Replace blend. |
void CalSubmesh::clearMorphTargetScales | ( | ) |
Clears the scale of each morph target.
Call this in preparation for calling blendMorphTargetScale() on the individual morph targets. As a side effect, this also clears the "weight" that setMorphTargetWeight() sets. The functions clear/blendMorphTargetScale() and setMorphTargetWeight() both set the influence of the morph target, but call it by different names (scale vs. weight) and have different composition behavior. Call one set of functions or the other.
void CalSubmesh::disableInternalData | ( | ) |
Disable internal data (and thus springs system)
bool CalSubmesh::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.
float CalSubmesh::getBaseWeight | ( | ) | const |
Gets weight of the base vertices.
int CalSubmesh::getCoreMaterialId | ( | ) | const |
Returns the core material ID.
This function returns the core material ID of the submesh instance.
CalCoreSubmesh * CalSubmesh::getCoreSubmesh | ( | ) |
Provides access to the core submesh.
This function returns the core submesh on which this submesh instance is based on.
const CalCoreSubmesh * CalSubmesh::getCoreSubmesh | ( | ) | const |
Provides access to the core submesh.
This function returns the core submesh on which this submesh instance is based on.
int CalSubmesh::getFaceCount | ( | ) | const |
Returns the number of faces.
This function returns the number of faces in the submesh instance.
int CalSubmesh::getFaces | ( | CalIndex * | pFaceBuffer | ) | const |
Provides access to the face data.
This function returns the face data (vertex indices) of the submesh instance. The LOD setting of the submesh instance is taken into account.
pFaceBuffer | A pointer to the user-provided buffer where the face data is written to. |
float CalSubmesh::getMorphTargetWeight | ( | int | blendId | ) | const |
Gets weight of a morph target with the given id.
blendId | The morph target id. |
bool CalSubmesh::getMorphTargetWeight | ( | const unsigned int & | morphName, |
float * | weightOut | ||
) |
Gets weight of a morph target with the given name.
morphName | The morph target name |
weightOut | fills in the weight on success |
int CalSubmesh::getMorphTargetWeightCount | ( | ) | const |
Returns the number of weights.
This function returns the number of weights.
std::vector< float > & CalSubmesh::getVectorMorphTargetWeight | ( | ) |
Returns the morph target weight vector.
This function returns the vector that contains all weights for each morph target instance.
const std::vector< float > & CalSubmesh::getVectorMorphTargetWeight | ( | ) | const |
Returns the morph target weight vector.
This function returns the vector that contains all weights for each morph target instance.
std::vector< CalVector > & CalSubmesh::getVectorNormal | ( | ) |
Returns the normal vector.
This function returns the vector that contains all normals of the submesh instance.
const std::vector< CalVector > & CalSubmesh::getVectorNormal | ( | ) | const |
Returns the normal vector.
This function returns the vector that contains all normals of the submesh instance.
std::vector< CalSubmesh::PhysicalProperty > & CalSubmesh::getVectorPhysicalProperty | ( | ) |
Returns the physical property vector.
This function returns the vector that contains all physical properties of the submesh instance.
const std::vector< CalSubmesh::PhysicalProperty > & CalSubmesh::getVectorPhysicalProperty | ( | ) | const |
Returns the physical property vector.
This function returns the vector that contains all physical properties of the submesh instance.
std::vector< std::vector< CalSubmesh::TangentSpace > > & CalSubmesh::getVectorVectorTangentSpace | ( | ) |
Returns the tangent space vector-vector.
This function returns the vector that contains all tangent space bases of the submesh instance. This vector contains another vector because there can be more than one texture map at each vertex.
const std::vector< std::vector< CalSubmesh::TangentSpace > > & CalSubmesh::getVectorVectorTangentSpace | ( | ) | const |
Returns the tangent space vector-vector.
This function returns the vector that contains all tangent space bases of the submesh instance. This vector contains another vector because there can be more than one texture map at each vertex.
std::vector< CalVector > & CalSubmesh::getVectorVertex | ( | ) |
Returns the vertex vector.
This function returns the vector that contains all vertices of the submesh instance.
const std::vector< CalVector > & CalSubmesh::getVectorVertex | ( | ) | const |
Returns the vertex vector.
This function returns the vector that contains all vertices of the submesh instance.
int CalSubmesh::getVertexCount | ( | ) | const |
Returns the number of vertices.
This function returns the number of vertices in the submesh instance.
bool CalSubmesh::hasInternalData | ( | ) | const |
Returns if the submesh instance handles vertex data internally.
This function returns wheter the submesh instance handles vertex data internally.
bool CalSubmesh::isTangentsEnabled | ( | int | mapId | ) | const |
Returns true if tangent vectors are enabled.
This function returns true if the submesh contains tangent vectors.
void CalSubmesh::setCoreMaterialId | ( | int | coreMaterialId | ) |
Sets the core material ID.
This function sets the core material ID of the submesh instance.
coreMaterialId | The core material ID that should be set. |
void CalSubmesh::setLodLevel | ( | float | lodLevel | ) |
Sets the LOD level.
This function sets the LOD level of the submesh instance.
lodLevel | The LOD level in the range [0.0, 1.0]. |
void CalSubmesh::setMorphTargetWeight | ( | int | blendId, |
float | weight | ||
) |
Sets weight of a morph target with the given id.
blendId | The morph target id. |
weight | The weight to be set. |
void CalSubmesh::setMorphTargetWeight | ( | const unsigned int & | morphName, |
float | weight | ||
) |
Sets weight of a morph target with the given name.
morphName | The morph target name. |
weight | The weight to be set. |