ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
MorphTransform< maxMorphs > Class Template Reference

A template class for managing 3D transformations using morph targets. More...

#include <MorphTransform.h>

Collaboration diagram for MorphTransform< maxMorphs >:

Public Member Functions

 MorphTransform (IEasyEaseAnimator *eEA)
 Constructs a MorphTransform object with an animation controller.
 
void AddMorph (uint16_t dictionaryValue, Vector3D positionOffset)
 Adds a morph target with a position offset.
 
void AddMorph (uint16_t dictionaryValue, Vector3D positionOffset, Vector3D scaleOffset)
 Adds a morph target with position and scale offsets.
 
void AddMorph (uint16_t dictionaryValue, Vector3D positionOffset, Vector3D scaleOffset, Vector3D rotationOffset)
 Adds a morph target with position, scale, and rotation offsets.
 
void SetMorphPositionOffset (uint16_t dictionaryValue, Vector3D positionOffset)
 Sets the position offset for a specific morph target.
 
void SetMorphScaleOffset (uint16_t dictionaryValue, Vector3D scaleOffset)
 Sets the scale offset for a specific morph target.
 
void SetMorphRotationOffset (uint16_t dictionaryValue, Vector3D rotationOffset)
 Sets the rotation offset for a specific morph target.
 
Vector3D GetPositionOffset ()
 Retrieves the combined position offset for all active morph targets.
 
Vector3D GetScaleOffset ()
 Retrieves the combined scale offset for all active morph targets.
 
Vector3D GetRotationOffset ()
 Retrieves the combined rotation offset for all active morph targets.
 

Private Attributes

IEasyEaseAnimatoreEA
 Pointer to the animation controller.
 
uint16_t dictionary [maxMorphs]
 Dictionary mapping morph targets to identifiers.
 
uint16_t currentMorphs = 0
 Current number of morph targets.
 
Vector3D positionOffsets [maxMorphs]
 Array of position offsets for morph targets.
 
Vector3D scaleOffsets [maxMorphs]
 Array of scale offsets for morph targets.
 
Vector3D rotationOffsets [maxMorphs]
 Array of rotation offsets for morph targets.
 

Detailed Description

template<size_t maxMorphs>
class MorphTransform< maxMorphs >

A template class for managing 3D transformations using morph targets.

The MorphTransform class allows the definition of multiple morph targets with position, scale, and rotation offsets. It integrates with an animation controller to dynamically calculate the resulting transformation based on animation values.

Template Parameters
maxMorphsThe maximum number of morph targets this class can handle.

Definition at line 29 of file MorphTransform.h.

Constructor & Destructor Documentation

◆ MorphTransform()

template<size_t maxMorphs>
MorphTransform ( IEasyEaseAnimator eEA)

Constructs a MorphTransform object with an animation controller.

Parameters
eEAPointer to the IEasyEaseAnimator instance.

Member Function Documentation

◆ AddMorph() [1/3]

template<size_t maxMorphs>
void AddMorph ( uint16_t  dictionaryValue,
Vector3D  positionOffset 
)

Adds a morph target with a position offset.

Parameters
dictionaryValueThe identifier for the morph target.
positionOffsetThe position offset for the morph target.

Referenced by DrGonzoProject::LinkControlParameters().

◆ AddMorph() [2/3]

template<size_t maxMorphs>
void AddMorph ( uint16_t  dictionaryValue,
Vector3D  positionOffset,
Vector3D  scaleOffset 
)

Adds a morph target with position and scale offsets.

Parameters
dictionaryValueThe identifier for the morph target.
positionOffsetThe position offset for the morph target.
scaleOffsetThe scale offset for the morph target.

◆ AddMorph() [3/3]

template<size_t maxMorphs>
void AddMorph ( uint16_t  dictionaryValue,
Vector3D  positionOffset,
Vector3D  scaleOffset,
Vector3D  rotationOffset 
)

Adds a morph target with position, scale, and rotation offsets.

Parameters
dictionaryValueThe identifier for the morph target.
positionOffsetThe position offset for the morph target.
scaleOffsetThe scale offset for the morph target.
rotationOffsetThe rotation offset for the morph target.

◆ GetPositionOffset()

template<size_t maxMorphs>
Vector3D GetPositionOffset ( )

Retrieves the combined position offset for all active morph targets.

Returns
The cumulative position offset.

Referenced by DrGonzoProject::Update().

◆ GetRotationOffset()

template<size_t maxMorphs>
Vector3D GetRotationOffset ( )

Retrieves the combined rotation offset for all active morph targets.

Returns
The cumulative rotation offset.

Referenced by DrGonzoProject::Update().

◆ GetScaleOffset()

template<size_t maxMorphs>
Vector3D GetScaleOffset ( )

Retrieves the combined scale offset for all active morph targets.

Returns
The cumulative scale offset.

Referenced by DrGonzoProject::Update().

◆ SetMorphPositionOffset()

template<size_t maxMorphs>
void SetMorphPositionOffset ( uint16_t  dictionaryValue,
Vector3D  positionOffset 
)

Sets the position offset for a specific morph target.

Parameters
dictionaryValueThe identifier for the morph target.
positionOffsetThe new position offset.

Referenced by DrGonzoProject::Update().

◆ SetMorphRotationOffset()

template<size_t maxMorphs>
void SetMorphRotationOffset ( uint16_t  dictionaryValue,
Vector3D  rotationOffset 
)

Sets the rotation offset for a specific morph target.

Parameters
dictionaryValueThe identifier for the morph target.
rotationOffsetThe new rotation offset.

◆ SetMorphScaleOffset()

template<size_t maxMorphs>
void SetMorphScaleOffset ( uint16_t  dictionaryValue,
Vector3D  scaleOffset 
)

Sets the scale offset for a specific morph target.

Parameters
dictionaryValueThe identifier for the morph target.
scaleOffsetThe new scale offset.

Member Data Documentation

◆ currentMorphs

template<size_t maxMorphs>
uint16_t currentMorphs = 0
private

Current number of morph targets.

Definition at line 33 of file MorphTransform.h.

◆ dictionary

template<size_t maxMorphs>
uint16_t dictionary[maxMorphs]
private

Dictionary mapping morph targets to identifiers.

Definition at line 32 of file MorphTransform.h.

◆ eEA

template<size_t maxMorphs>
IEasyEaseAnimator* eEA
private

Pointer to the animation controller.

Definition at line 31 of file MorphTransform.h.

◆ positionOffsets

template<size_t maxMorphs>
Vector3D positionOffsets[maxMorphs]
private

Array of position offsets for morph targets.

Definition at line 34 of file MorphTransform.h.

◆ rotationOffsets

template<size_t maxMorphs>
Vector3D rotationOffsets[maxMorphs]
private

Array of rotation offsets for morph targets.

Definition at line 36 of file MorphTransform.h.

◆ scaleOffsets

template<size_t maxMorphs>
Vector3D scaleOffsets[maxMorphs]
private

Array of scale offsets for morph targets.

Definition at line 35 of file MorphTransform.h.


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