HBhvInterpolatorPosition
-
class
HBhvInterpolatorPosition The
HBhvInterpolatorPositionclass controls positional interpolation.HBhvInterpolatorPositionallows for either linear or spline based movement. This class can be used for camera interpolation as well other targets.Inherits from:
HBhvInterpolator
Methods
-
HBhvInterpolatorPosition::HBhvInterpolatorPosition(HBhvAnimation *animation = 0, char const *name = 0) Constructs an
HBhvInterpolatorPositionobject.Parameters
animation: The animation that this interpolator belongs to.
name: The name of the interpolator.
-
char const *
HBhvInterpolatorPosition::GetType() virtual
Returns
Type of the interpolator which is ‘Pos’.
-
virtual HBhvInterpolator *
HBhvInterpolatorPosition::CreateInstance(HBhvAnimation *ainst) virtual
In special cases, you may want an interpolator that references this interpolator without changing it. Use this method to create the new interpolator passing a pointer to the animation that you want it to be associated with.
Parameters
ainst: The animation instance that this interpolator is associated with.Returns
The newly created interpolator that references this interpolator.
-
void
HBhvInterpolatorPosition::InsertLinear(HPoint pos, int l = 0) This method creates a new linear positional keyframe with the passed pos value and then inserts it after the passed position l into the keyframe array.
Parameters
pos: The position value for the keyframe to be inserted.
l: The position in the array to insert the item after.
-
void
HBhvInterpolatorPosition::ReplaceLinear(HPoint pos, int l) Replaces the item at the given position in the keyframe array with a new linear positional keyframe that was created with the passed pos value.
Parameters
pos: The position value for the new replacement keyframe.
l: The array position to replace.
-
void
HBhvInterpolatorPosition::InsertCurve(HPoint pos, int l = 0) This method creates a new non-linear positional keyframe with the passed pos value and then inserts it after the passed position l into the keyframe array.
Parameters
pos: The position value for the keyframe to be insert.
l: The array position to insert item after.
-
void
HBhvInterpolatorPosition::ReplaceCurve(HPoint pos, int l) Replaces the item at the given position in the keyframe array with a new non-linear positional keyframe that was created with the passed pos value.
Parameters
pos: The position value for the new replacement keyframe.
l: The array position to replace.
-
void
HBhvInterpolatorPosition::InsertDiscrete(HPoint pos, int l = 0) This method creates a new discrete positional keyframe with the passed pos value and then inserts it after the passed position l into the keyframe array.
Parameters
pos: The position value for the new keyframe to be inserted.
l: The array position to insert item after.
-
virtual void
HBhvInterpolatorPosition::Serialize(HUtilityXMLGenerator *xmlgen) virtual
Writes XML data to a buffer using the passed XML generator.
-
virtual void
HBhvInterpolatorPosition::Interpolate(int keyframe, float fraction) virtual
Performs an interpolation on this interpolator’s animation target.
Parameters
keyframe: The reference keyframe for this interpolation.
fraction: The fraction value from the specified keyframe to the next keyframe. The value is from 0 to 1.
-
virtual void
HBhvInterpolatorPosition::Evaluate(int keyframe, float fraction, bool &hasPos, HPoint &pos, bool &hasQuat, HQuat &quat, bool &hasScale, HPoint &scale) virtual
-
virtual void
HBhvInterpolatorPosition::Reset() virtual
Resets the interpolator instance.
-
virtual void
HBhvInterpolatorPosition::CalculatePos(int keyframe, float fraction, HPoint &res) virtual
Calculates the interpolated positional value given a keyframe and fraction to the next keyframe.
Parameters
keyframe: The reference keyframe for this interpolation.
fraction: The fractional value from the specified keyframe to the next keyframe. This value is from 0 to 1.
res: The result of the interpolation.
-
static void *
HBhvInterpolatorPosition::XMLCallback(HUtilityXMLTag *xt, bool open, void *m_pExtraData) static
This is XML read callback which parses XML data and then populates the member variables with the associated values.
-
virtual void
HBhvInterpolatorPosition::InterpolateCamera(HPoint &pos, bool simulate = false) protected virtual
Calculates the interpolated camera orientation and position for camera types that are position driven.
Parameters
pos: New Camera Position Reference
-
virtual void
HBhvInterpolatorPosition::InterpolateCamera2(HPoint &pos, bool simulate = false) protected virtual
Calculates the interpolated camera orientation for camera types that are target driven.
Parameters
pos: New Camera Position Reference
-
virtual void
HBhvInterpolatorPosition::CalculateAllTangents() protected virtual
This is a helper method that calculates the tangents for all the entries in the keyframe array. You can call this method before doing an interpolation.