◆ CalMorphTargetMixer()
CalMorphTargetMixer::CalMorphTargetMixer |
( |
CalModel * |
pModel | ) |
|
Constructs the morph target mixer instance.
This function is the default constructor of the morph target mixer instance.
◆ blend()
bool CalMorphTargetMixer::blend |
( |
int |
id, |
|
|
float |
weight, |
|
|
float |
delayIn, |
|
|
float |
delayOut, |
|
|
bool |
looping |
|
) |
| |
Interpolates the morph target weights based on an animation.
This function interpolates the weight of a morph target a new value in a given amount of time.
- Parameters
-
id | The ID of the morph target that should be blended. |
weight | The weight to interpolate the morph target to. |
delayIn | The time in seconds until the new weight should be reached. |
delayOut | The time in seconds until the weight goes back to zero at the end of the animation. |
looping | True if the morph animation should continuously loop. |
- Returns
- One of the following values:
- true if successful
- false if an error happened
◆ clear()
bool CalMorphTargetMixer::clear |
( |
int |
id, |
|
|
float |
delay |
|
) |
| |
Fades a morph target out.
This function fades a morph target out in a given amount of time.
- Parameters
-
id | The ID of the morph target that should be faded out. |
delay | The time in seconds until the the morph target is completely removed. |
- Returns
- One of the following values:
- true if successful
- false if an error happened
◆ copy()
Copy data from one mixer (for the same core model) to another.
- Parameters
-
inOther | The mixer to copy. |
- Returns
- True on success.
◆ getCurrentWeight()
float CalMorphTargetMixer::getCurrentWeight |
( |
int |
id | ) |
const |
Get the weight of a morph target.
- Parameters
-
id | The id of the morph target which weight you want. |
- Returns
- The weight of the morph target with the given id.
◆ getDuration()
float CalMorphTargetMixer::getDuration |
( |
int |
id | ) |
const |
Get the duration of a morph target.
- Parameters
-
id | The id of the morph target. |
- Returns
- The duration of the morph target with the given id.
◆ getKeyframeCount()
int CalMorphTargetMixer::getKeyframeCount |
( |
int |
id | ) |
const |
Get the number of keyframes for a morph target.
- Parameters
-
id | The id of the morph target. |
- Returns
- The number of keyframes for the morph target with the given id.
◆ getMorphName()
const std::string & CalMorphTargetMixer::getMorphName |
( |
int |
id | ) |
const |
Get the name of a morph target animation.
- Parameters
-
id | The id of the morph target. |
- Returns
- The morph target animation name.
◆ getMorphTargetCount()
int CalMorphTargetMixer::getMorphTargetCount |
( |
| ) |
const |
Returns the number of morph targets this morph target mixer mixes.
- Returns
- The number of morph targets this morph target mixer mixes.
◆ getMorphTracks()
const std::list< CalCoreMorphTrack > & CalMorphTargetMixer::getMorphTracks |
( |
int |
id | ) |
const |
Get the tracks for a morph target.
- Parameters
-
id | The id of the morph target. |
- Returns
- The tracks for the morph target with the given id.
◆ getTrackCount()
int CalMorphTargetMixer::getTrackCount |
( |
int |
id | ) |
const |
Get the number of tracks for a morph target.
- Parameters
-
id | The id of the morph target. |
- Returns
- The number of tracks for the morph target with the given id.
◆ manualBlend()
bool CalMorphTargetMixer::manualBlend |
( |
int |
id, |
|
|
float |
weight, |
|
|
float |
time |
|
) |
| |
Interpolates the morph target weights based on an animation.
This function sets a morph target animation at a specific time interval.
- Parameters
-
id | The ID of the morph target that should be blended. |
weight | The weight to interpolate the morph target to. |
time | The current time value to set the animation at. |
- Returns
- One of the following values:
- true if successful
- false if an error happened
◆ update()
void CalMorphTargetMixer::update |
( |
float |
deltaTime | ) |
|
Updates all morph targets.
This function updates all morph targets of the mixer instance for a given amount of time.
- Parameters
-
deltaTime | The elapsed time in seconds since the last update. |
The documentation for this class was generated from the following files: