The HKeyframeChannelCurve class is used for spline based interpolation of positional values.
More...
#include <HBhvUtility.h>
|
| void | CalculateCurveFactor (HBhvTimeline *timeline, int keyframe) |
| |
| void | CalculateCurveLength (HPoint p2) |
| |
| void | CalculateHermiteTangents (HPoint p0, HPoint p2, HPoint p3, float a=0.5f) |
| |
| virtual HKeyframe * | Clone () |
| |
| void | DrawTangents (HPoint p2) |
| |
| | HKeyframeChannelCurve (float x=0, float y=0, float z=0) |
| |
| virtual void | Interpolate (HKeyframeChannel **posarray, int keyframe, float fraction, int length, HPoint &res) |
| |
| HPoint | InterpolateHermiteSpline (float fraction, HPoint p1, HPoint p2) |
| |
| virtual void | Serialize (HUtilityXMLTag *xmlgen) |
| |
| | HKeyframeChannel () |
| |
| | HKeyframe () |
| |
| virtual void | SetConstant (bool constant) |
| |
| virtual void | SetEaseInOut (bool easeinout) |
| |
| virtual void | SetRelative (bool relative) |
| |
The HKeyframeChannelCurve class is used for spline based interpolation of positional values.
| HKeyframeChannelCurve::HKeyframeChannelCurve |
( |
float |
x = 0, |
|
|
float |
y = 0, |
|
|
float |
z = 0 |
|
) |
| |
|
inline |
| void HKeyframeChannelCurve::CalculateCurveFactor |
( |
HBhvTimeline * |
timeline, |
|
|
int |
keyframe |
|
) |
| |
| void HKeyframeChannelCurve::CalculateCurveLength |
( |
HPoint |
p2 | ) |
|
This method calculates the length of this curve between this keyframe and a given point.
- Parameters
-
| p2 | The point to calculate the length with. |
| void HKeyframeChannelCurve::CalculateHermiteTangents |
( |
HPoint |
p0, |
|
|
HPoint |
p2, |
|
|
HPoint |
p3, |
|
|
float |
a = 0.5f |
|
) |
| |
Use this method to precalculate tangents for the hermite spline. This method can be usef as a helper function for interpolation.
- Parameters
-
| p0 | The first point for tangent calculation. |
| p2 | The third point for tangent calculation. |
| p3 | The fourth Point for tangent calculation. |
| a | Constant for hermite spline |
| virtual HKeyframe* HKeyframeChannelCurve::Clone |
( |
| ) |
|
|
inlinevirtual |
| void HKeyframeChannelCurve::DrawTangents |
( |
HPoint |
p2 | ) |
|
This method creates a visualization of the tangents calculated for this curve by drawing them into the scene.
- Parameters
-
| p2 | The second point to calculate tangents from. |
| virtual void HKeyframeChannelCurve::Interpolate |
( |
HKeyframeChannel ** |
posarray, |
|
|
int |
keyframe, |
|
|
float |
fraction, |
|
|
int |
length, |
|
|
HPoint & |
res |
|
) |
| |
|
virtual |
Calculates the interpolation between this keyframe and the next keyframe.
- Parameters
-
| posarray | The array of HKeyframeChannel objects. |
| keyframe | They current keyframe number. |
| fraction | The fraction from this keyframe to next. |
| length | The number of entries in the keyframe array. |
| res | Returns the interpolation result. |
Reimplemented from HKeyframeChannel.
Reimplemented in HKeyframeChannelFollowPath.
| HPoint HKeyframeChannelCurve::InterpolateHermiteSpline |
( |
float |
fraction, |
|
|
HPoint |
p1, |
|
|
HPoint |
p2 |
|
) |
| |
This method uses the given frame and control points to interpolate a Hermite spline.
- Parameters
-
| fraction | Distance between the first and second control point. |
| p1 | The first control point. |
| p2 | The second control point. |
- Returns
- The interpolated result.
| virtual void HKeyframeChannelCurve::Serialize |
( |
HUtilityXMLTag * |
xmlgen | ) |
|
|
virtual |
| float HKeyframeChannelCurve::b |
| float HKeyframeChannelCurve::c |
| HPoint* HKeyframeChannelCurve::control_polygon |
| float HKeyframeChannelCurve::ItemType |
| float HKeyframeChannelCurve::m_curvelength |
| float HKeyframeChannelCurve::m_factor1 |
| float HKeyframeChannelCurve::m_factor2 |
| HPoint HKeyframeChannelCurve::m_tangent1 |
| HPoint HKeyframeChannelCurve::m_tangent2 |
The documentation for this class was generated from the following file: