#include <lib_ca.h>
CAMorphNode class allows to access the actual morph data. For every morph there exist a morph node tree representing the hierarchy of the morphed objects.
Before using any of the access function always check which data exist with GetInfo(). Also make sure the data has been expanded with CAMORPH_MODE_FLAGS::EXPAND in SetMode().
Example of a simple case with one polygon object. In this case just access the first morph node of the morph to be changed.
First exit any editing:
Get the morph to be changed:
Now get the morph node. The first will be the object with the morph tag:
Data must be made editable
The point data can now be accessed, but make sure the data exists:
To access the data use GetPointCount(), SetPointCount(), GetPoint() and SetPoint().
Once finished put the data back to its original form:
Finally the tag must be updated:
Private Member Functions | |
CAMorphNode () | |
~CAMorphNode () | |
Navigation | |
CAMorphNode * | GetNext () |
CAMorphNode * | GetPrev () |
CAMorphNode * | GetUp () |
CAMorphNode * | GetDown () |
Get Link | |
BaseList2D * | GetLink (CAPoseMorphTag *tag, CAMorph *morph, BaseDocument *doc) |
Get Info | |
CAMORPH_DATA_FLAGS | GetInfo () |
Get/Set Positon/Scale/Rotation | |
Vector | GetP () |
Vector | GetS () |
Vector | GetR () |
void | SetP (const Vector &p) |
void | SetS (const Vector &s) |
void | SetR (const Vector &r) |
Point | |
Int32 | GetPointCount () |
Bool | SetPointCount (Int32 cnt) |
Vector | GetPoint (Int32 index) |
void | SetPoint (Int32 index, const Vector &pnt) |
Tangent | |
Int32 | GetTangentCount () |
Bool | SetTangentCount (Int32 cnt) |
Vector | GetTangent (Int32 index) |
void | SetTangent (Int32 index, const Vector &v) |
Vertex Map | |
Int32 | GetVertexMapTagCount () |
Int32 | GetVertexMapCount (Int32 tindex) |
Bool | SetVertexMapCount (Int32 tindex, Int32 cnt) |
Float | GetVertexMap (Int32 tindex, Int32 index) |
void | SetVertexMap (Int32 tindex, Int32 index, Float v) |
Parameters | |
Int32 | GetParamCount () |
Bool | SetParamCount (Int32 cnt) |
Bool | GetParam (Int32 index, GeData &data, DescID &id) |
void | SetParam (Int32 index, const GeData &data, const DescID &id) |
UV | |
Int32 | GetUVTagCount () |
Int32 | GetUVCount (Int32 tindex) |
Bool | SetUVCount (Int32 tindex, Int32 cnt) |
void | GetUV (Int32 tindex, Int32 index, UVWStruct &uv) |
void | SetUV (Int32 tindex, Int32 index, const UVWStruct &uv) |
Weight Map | |
Int32 | GetWeightMapTagCount () |
Int32 | GetWeightMapJointCount (Int32 tindex) |
Int32 | GetWeightMapCount (Int32 tindex, Int32 jindex) |
Bool | SetWeightMapCount (Int32 tindex, Int32 jindex, Int32 cnt) |
Float | GetWeightMap (Int32 tindex, Int32 jindex, Int32 index) |
void | SetWeightMap (Int32 tindex, Int32 jindex, Int32 index, Float v) |
PSD Reference | |
CAReferencePSD * | GetPSDReference () |
|
private |
|
private |
CAMorphNode* GetNext | ( | ) |
Retrieves the next morph node.
CAMorphNode* GetPrev | ( | ) |
Retrieves the previous morph node.
CAMorphNode* GetUp | ( | ) |
Retrieves the parent morph node.
CAMorphNode* GetDown | ( | ) |
Retrieves the first child morph node.
BaseList2D* GetLink | ( | CAPoseMorphTag * | tag, |
CAMorph * | morph, | ||
BaseDocument * | doc | ||
) |
Retrieves the object linked to the morph node.
[in] | tag | The morph tag containing the morph data. |
[in] | morph | The morph containing the morph node. |
[in] | doc | The document containing the linked object. |
CAMORPH_DATA_FLAGS GetInfo | ( | ) |
Gets what morph data is stored in the morph node.
Vector GetP | ( | ) |
Retrieves the position of the morph node.
Vector GetS | ( | ) |
Retrieves the scale of the morph node.
Vector GetR | ( | ) |
Retrieves the HPB rotation of the morph node.
void SetP | ( | const Vector & | p | ) |
Sets the position of the morph node.
[in] | p | The new position. |
void SetS | ( | const Vector & | s | ) |
Sets the scale of the morph node.
[in] | s | The new scale. |
void SetR | ( | const Vector & | r | ) |
Sets the HPB rotation.
[in] | r | The new HPB rotation. |
Int32 GetPointCount | ( | ) |
Retrieves the point count of the morph node.
Sets the point count of the morph node.
[in] | cnt | The new point count. |
Retrieves the point at index.
[in] | index | The point index: 0 <= index < GetPointCount() |
Sets the point at index.
[in] | index | The point index: 0 <= index < GetPointCount() |
[in] | pnt | The new point coordinate. |
Int32 GetTangentCount | ( | ) |
Retrieves the tangent count of the morph node.
Sets the tangent count of the morph node.
[in] | cnt | The new tangent count. |
Retrieves the tangent at index.
[in] | index | The tangent index: 0 <= index < GetTangentCount() |
Sets the tangent at index.
[in] | index | The tangent index: 0 <= index < GetPointCount() |
[in] | v | The new tangent coordinate. |
Int32 GetVertexMapTagCount | ( | ) |
Retrieves the number of vertex map tags of the morph node.
Retrieves the size of the vertex map at tindex.
[in] | tindex | The vertex map tag index: 0 <= tindex < GetVertexMapTagCount() |
Sets the size of the vertex map at tindex.
[in] | tindex | The vertex map tag index: 0 <= tindex < GetVertexMapTagCount() |
[in] | cnt | The new size of the vertex map at tindex. |
Retrieves the vertex map value at index of the tindex vertex map.
[in] | tindex | The vertex map tag index: 0 <= tindex < GetVertexMapTagCount() |
[in] | index | The vertex map index. 0 <= index < GetVertexMapCount() |
Sets the vertex map value at index of the tindex vertex map.
[in] | tindex | The vertex map tag index: 0 <= tindex < GetVertexMapTagCount() |
[in] | index | The vertex map index. 0 <= index < GetVertexMapCount() |
[in] | v | The new vertex map value. |
Int32 GetParamCount | ( | ) |
Retrieves the number of parameters for the morph node.
Sets the number of parameters for the morph node.
[in] | cnt | The new number of parameters. |
Retrieves the parameter at index for the morph node.
[in] | index | The parameter index: 0 <= index < GetParamCount() |
[out] | data | Assigned the parameter value. |
[out] | id | Assigned the description ID of the parameter. |
Sets the parameter at index for the morph node.
[in] | index | The parameter index: 0 <= index < GetParamCount() |
[in] | data | The new parameter value. |
[in] | id | The new parameter description ID. |
Int32 GetUVTagCount | ( | ) |
Retrieves the number of UV tags.
Retrieves the UV coordinates count of the UV tag at tindex.
[in] | tindex | The UV tag index: 0 <= tindex < GetUVTagCount() |
Sets the UV coordinates count of the UV tag at tindex.
[in] | tindex | The UV tag index: 0 <= tindex < GetUVTagCount() |
[in] | cnt | The new UV coordinates count. |
Retrieves the UV coordinate index of the tindex UV tag.
[in] | tindex | The UV tag index: 0 <= tindex < GetUVTagCount() |
[in] | index | The UV coordinates index: 0 <= index < GetUVCount() |
[out] | uv | Assigned the UV coordinates. |
Sets the UV coordinate index of the tindex UV tag.
[in] | tindex | The UV tag index: 0 <= tindex < GetUVTagCount() |
[in] | index | The UV coordinates index: 0 <= index < GetUVCount() |
[in] | uv | The new UV coordinates. |
Int32 GetWeightMapTagCount | ( | ) |
Retrieves the number of weight map tags.
Retrieves the joint count of the weight tag at tindex.
[in] | tindex | The weight tag index: 0 <= tindex < GetWeightMapTagCount() |
Retrieves the weights count of the joint at jindex of tindex weight tag.
[in] | tindex | The weight tag index: 0 <= tindex < GetWeightMapTagCount() |
[in] | jindex | The joint index: 0 <= jindex < GetWeightMapJointCount() |
Sets the weights count of the joint at jindex of tindex weight tag.
[in] | tindex | The weight tag index: 0 <= tindex < GetWeightMapTagCount() |
[in] | jindex | The joint index: 0 <= jindex < GetWeightMapJointCount() |
[in] | cnt | The new weight count. |
Retrieves the weight at index of jindex joint and tindex Weight tag.
[in] | tindex | The weight tag index: 0 <= tindex < GetWeightMapTagCount() |
[in] | jindex | The joint index: 0 <= jindex < GetWeightMapJointCount() |
[in] | index | The weight index: 0 <= index < GetWeightMapCount() |
Sets the weight at index of jindex joint and tindex Weight tag.
[in] | tindex | The weight tag index: 0 <= tindex < GetWeightMapTagCount() |
[in] | jindex | The joint index: 0 <= jindex < GetWeightMapJointCount() |
[in] | index | The weight index: 0 <= index < GetWeightMapCount() |
[in] | v | The new weight. |
CAReferencePSD* GetPSDReference | ( | ) |
Retrieves the PSD data for a point pose holding the reference pose and providing multiple functions dedicated to PSD behavior.