CAMorphNode Class Reference

#include <c4d_posemorphtagdata.h>

Navigation

CAMorphNodeGetNext ()
 
CAMorphNodeGetPrev ()
 
CAMorphNodeGetUp ()
 
CAMorphNodeGetDown ()
 

Get Link

BaseList2DGetLink (PoseMorphTagData *tag, CAMorph *morph, BaseDocument *doc)
 

Get Info

CAMORPH_DATA_FLAGS GetInfo ()
 

Get/Set Positon/Scale/Rotation

Vector GetP ()
 
Vector GetS ()
 
Vector GetR ()
 

Point

Int32 GetPointCount ()
 
Vector GetPoint (Int32 index)
 

Detailed Description

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().
Example of a simple case with one polygon object. In this case just access the first morph node of the morph to get the data from.
Get the morph to get the data from:

CAMorph* morph = mtag->GetMorph(1);

Now get the morph node. The first will be the object with the morph tag:

CAMorphNode* mnode = morph->GetFirst();

The point data can now be accessed, but make sure the data exists:

mnode->GetInfo() & CAMORPH_DATA_FLAGS::POINTS

To access the data use GetPointCount() and GetPoint().

Member Function Documentation

◆ GetNext()

CAMorphNode* GetNext ( )

Retrieves the next morph node.

Returns
The next morph node, or nullptr if there is none. Cineware SDK owns the pointed morph node.

◆ GetPrev()

CAMorphNode* GetPrev ( )

Retrieves the previous morph node.

Returns
The previous morph node, or nullptr if there is none. Cineware SDK owns the pointed morph node.

◆ GetUp()

CAMorphNode* GetUp ( )

Retrieves the parent morph node.

Returns
The parent morph node, or nullptr if there is none. Cineware SDK owns the pointed morph node.

◆ GetDown()

CAMorphNode* GetDown ( )

Retrieves the first child morph node.

Returns
The first child morph node, or nullptr if there is none. Cineware SDK owns the pointed morph node.

◆ GetLink()

BaseList2D* GetLink ( PoseMorphTagData tag,
CAMorph morph,
BaseDocument doc 
)

Retrieves the object linked to the morph node.

Parameters
[in]tagThe morph tag containing the morph data.
[in]morphThe morph containing the morph node.
[in]docThe document containing the linked object.
Returns
The linked object, or nullptr if there is none. Cineware SDK owns the pointed object.

◆ GetInfo()

CAMORPH_DATA_FLAGS GetInfo ( )

Gets what morph data is stored in the morph node.

Returns
The data flags: CAMORPH_DATA_FLAGS

◆ GetP()

Vector GetP ( )

Retrieves the position of the morph node.

Returns
The position.

◆ GetS()

Vector GetS ( )

Retrieves the scale of the morph node.

Returns
The scale.

◆ GetR()

Vector GetR ( )

Retrieves the HPB rotation of the morph node.

Returns
The HPB rotation.

◆ GetPointCount()

Int32 GetPointCount ( )

Retrieves the point count of the morph node.

Returns
The point count.

◆ GetPoint()

Vector GetPoint ( Int32  index)

Retrieves the point at index.

Parameters
[in]indexThe point index: 0 <= index < GetPointCount()
Returns
The point at index.