FCDAnimationCurve Class Reference
[COLLADA Document Object Model.]

A COLLADA single-dimensional animation curve. More...

#include <FCDAnimationCurve.h>

Inheritance diagram for FCDAnimationCurve:

FCDObject FUObject List of all members.

Public Member Functions

 FCDAnimationCurve (FCDocument *document, FCDAnimationChannel *parent)
 Constructor: do not use directly.
virtual ~FCDAnimationCurve ()
 Destructor: do not release directly.
FCDAnimationChannelGetParent ()
 Retrieves the animation channel that contains this animation curve.
const FCDAnimationChannelGetParent () const
 See above.
FloatListGetKeys ()
 Retrieves the list of key inputs for the animation curve.
const FloatListGetKeys () const
 See above.
FloatListGetKeyValues ()
 Retrieves the list of key outputs for the animation curve.
const FloatListGetKeyValues () const
 See above.
UInt32ListGetInterpolations ()
 Retrieves the list of interpolation type for the segments of the animation curve.
const UInt32ListGetInterpolations () const
 See above.
FloatListGetInTangents ()
 Retrieves the list of key in-tangent values for the animation curve.
const FloatListGetInTangents () const
 See above.
FloatListGetOutTangents ()
 Retrieves the list of key out-tangent values for the animation curve.
const FloatListGetOutTangents () const
 See above.
FloatListGetInTangentWeights ()
 Retrieves the list of key in-tangent weights for the animation curve.
const FloatListGetInTangentWeights () const
 See above.
FloatListGetOutTangentWeights ()
 Retrieves the list of key out-tangent weights for the animation curve.
const FloatListGetOutTangentWeights () const
 See above.
bool IsWeightedCurve () const
 Retrieves whether this curve has weighted tangents.
void SetWeightedCurveFlag (bool _isWeightedCurve)
 Sets whether this curve has weighted tangents.
FUDaeInfinity::Infinity GetPreInfinity () const
 Retrieves the type of behavior for the curve if the input value is outside the input interval defined by the curve keys and less than any key input value.
void SetPreInfinity (FUDaeInfinity::Infinity infinity)
 Sets the behavior of the curve if the input value is outside the input interval defined by the curve keys and less than any key input value.
FUDaeInfinity::Infinity GetPostInfinity () const
 Retrieves the type of behavior for the curve if the input value is outside the input interval defined by the curve keys and greater than any key input value.
void SetPostInfinity (FUDaeInfinity::Infinity infinity)
 Sets the behavior of the curve if the input value is outside the input interval defined by the curve keys and greater than any key input value.
const float * GetDriver () const
 Retrieves the value pointer that drives this animation curve.
void SetDriver (const float *driver)
 Sets the value pointer that drives the animation curve.
FCDAnimationClipListGetClips ()
 Retrieves the list of animation clips that use this animation curve.
const FCDAnimationClipListGetClips () const
 See above.
void Ready ()
 Readies this curve for evaluation.
FCDAnimationCurveClone ()
 Clones the animation curve.
void ConvertValues (FCDConversionFunction valueConversion, FCDConversionFunction tangentConversion)
 Applies a conversion function to the keys output values of the animation curve.
void ConvertInputs (FCDConversionFunction timeConversion, FCDConversionFunction tangentWeightConversion)
 Applies a conversion function to the keys input values of the animation curve.
float Evaluate (float input) const
 Evaluates the animation curve.
void RegisterAnimationClip (FCDAnimationClip *clip)
 [INTERNAL] Adds an animation clip to the list of animation clips that use this curve.
void WriteSourceToXML (xmlNode *parentNode, const string &baseId) const
 [INTERNAL] Writes out the data sources necessary to import the animation curve to a given XML tree node.
xmlNode * WriteSamplerToXML (xmlNode *parentNode, const string &baseId) const
 [INTERNAL] Writes out the sampler that puts together the data sources and generates a sampling function.
xmlNode * WriteChannelToXML (xmlNode *parentNode, const string &baseId, const char *targetPointer) const
 [INTERNAL] Writes out the animation channel that attaches the sampling function to the animatable value.
int32 GetTargetElement () const
 [INTERNAL] Retrieves the target element suffix for the curve.
const string & GetTargetQualifier () const
 [INTERNAL] Retrieves the target qualifier for the curve.
void SetTargetElement (int32 e)
 [INTERNAL] Sets the target element suffix for the curve.
void SetTargetQualifier (const string &q)
 [INTERNAL] Sets the target qualifier for the curve.
const string & GetDriverPointer () const
 [INTERNAL] Retrieves the target pointer prefix of the driver.
void SetDriverPointer (const string &p)
 [INTERNAL] Sets the target pointer prefix of the driver.

Detailed Description

A COLLADA single-dimensional animation curve.

An animation curve holds the keyframes necessary to animate an animatable floating-point value.

There are multiple interpolation mechanisms supported by COLLADA. FCollada supports the CONSTANT, LINEAR and BEZIER interpolations.

See also:
FUDaeInterpolation FUDaeInfinity


Constructor & Destructor Documentation

FCDAnimationCurve::FCDAnimationCurve FCDocument document,
FCDAnimationChannel parent
 

Constructor: do not use directly.

Instead, use the FCDAnimationChannel::AddCurve function. You should also attach the new curve to an animated element using the FCDAnimated::SetCurve function.

Parameters:
document The COLLADA document that owns the animation curve.
parent The animation channel that contains the curve.

virtual FCDAnimationCurve::~FCDAnimationCurve  )  [virtual]
 

Destructor: do not release directly.

Instead, use the FCDAnimationChannel::ReleaseCurve function.


Member Function Documentation

FCDAnimationCurve* FCDAnimationCurve::Clone  ) 
 

Clones the animation curve.

Returns:
The cloned animation curve.

void FCDAnimationCurve::ConvertInputs FCDConversionFunction  timeConversion,
FCDConversionFunction  tangentWeightConversion
 

Applies a conversion function to the keys input values of the animation curve.

Parameters:
timeConversion The conversion function to use on the key inputs.
tangentWeightConversion The conversion function to use on the key tangent weights.

void FCDAnimationCurve::ConvertValues FCDConversionFunction  valueConversion,
FCDConversionFunction  tangentConversion
 

Applies a conversion function to the keys output values of the animation curve.

Parameters:
valueConversion The conversion function to use on the key outputs.
tangentConversion The conversion function to use on the key tangents.

float FCDAnimationCurve::Evaluate float  input  )  const
 

Evaluates the animation curve.

Parameters:
input An input value.
Returns:
The sampled value of the curve at the given input value.

FCDAnimationClipList& FCDAnimationCurve::GetClips  )  [inline]
 

Retrieves the list of animation clips that use this animation curve.

Returns:
The list of animation clips.

const float* FCDAnimationCurve::GetDriver  )  const [inline]
 

Retrieves the value pointer that drives this animation curve.

Returns:
The driver value pointer. This pointer will be NULL to indicate that time drives the animation curve.

const string& FCDAnimationCurve::GetDriverPointer  )  const [inline]
 

[INTERNAL] Retrieves the target pointer prefix of the driver.

Returns:
The driver's target pointer prefix.

FloatList& FCDAnimationCurve::GetInTangents  )  [inline]
 

Retrieves the list of key in-tangent values for the animation curve.

This list has data only for curves that include segments with the bezier interpolation.

Returns:
The list of in-tangent values.

FloatList& FCDAnimationCurve::GetInTangentWeights  )  [inline]
 

Retrieves the list of key in-tangent weights for the animation curve.

This list has data only for curves that are weighted and include segments with the bezier interpolation.

See also:
IsWeightedCurve
Returns:
The list of in-tangent weights.

UInt32List& FCDAnimationCurve::GetInterpolations  )  [inline]
 

Retrieves the list of interpolation type for the segments of the animation curve.

There is always one interpolation type for each key in the curve. The interpolation type of a segment of the curve is set at the key at which begins the segment.

See also:
FUDaeInterpolation
Returns:
The list of interpolation types.

FloatList& FCDAnimationCurve::GetKeys  )  [inline]
 

Retrieves the list of key inputs for the animation curve.

Returns:
The list of key inputs.

FloatList& FCDAnimationCurve::GetKeyValues  )  [inline]
 

Retrieves the list of key outputs for the animation curve.

Returns:
The list of key outputs.

FloatList& FCDAnimationCurve::GetOutTangents  )  [inline]
 

Retrieves the list of key out-tangent values for the animation curve.

This list has data only for curves that include segments with the bezier interpolation.

Returns:
The list of out-tangent values.

FloatList& FCDAnimationCurve::GetOutTangentWeights  )  [inline]
 

Retrieves the list of key out-tangent weights for the animation curve.

This list has data only for curves that are weighted and include segments with the bezier interpolation.

See also:
IsWeightedCurve
Returns:
The list of out-tangent weights.

FCDAnimationChannel* FCDAnimationCurve::GetParent  )  [inline]
 

Retrieves the animation channel that contains this animation curve.

Returns:
The parent animation channel.

FUDaeInfinity::Infinity FCDAnimationCurve::GetPostInfinity  )  const [inline]
 

Retrieves the type of behavior for the curve if the input value is outside the input interval defined by the curve keys and greater than any key input value.

See also:
FUDaeInfinity
Returns:
The post-infinity behavior of the curve.

FUDaeInfinity::Infinity FCDAnimationCurve::GetPreInfinity  )  const [inline]
 

Retrieves the type of behavior for the curve if the input value is outside the input interval defined by the curve keys and less than any key input value.

See also:
FUDaeInfinity
Returns:
The pre-infinity behavior of the curve.

int32 FCDAnimationCurve::GetTargetElement  )  const [inline]
 

[INTERNAL] Retrieves the target element suffix for the curve.

This will be -1 if the animated element does not belong to an animated element list.

Returns:
The target element suffix.

const string& FCDAnimationCurve::GetTargetQualifier  )  const [inline]
 

[INTERNAL] Retrieves the target qualifier for the curve.

This will be the empty string if that the curve affects a one-dimensional animated element.

Returns:
The target qualifier.

bool FCDAnimationCurve::IsWeightedCurve  )  const [inline]
 

Retrieves whether this curve has weighted tangents.

Tangent weights give you access to 2D tangents by providing the length of the tangent.

Returns:
Whether this curve has weighted tangents.

void FCDAnimationCurve::Ready  ) 
 

Readies this curve for evaluation.

This will create the tangents and the tangent weights, if necessary.

void FCDAnimationCurve::RegisterAnimationClip FCDAnimationClip *  clip  )  [inline]
 

[INTERNAL] Adds an animation clip to the list of animation clips that use this curve.

Parameters:
clip An animation clip.

void FCDAnimationCurve::SetDriver const float *  driver  )  [inline]
 

Sets the value pointer that drives the animation curve.

Parameters:
driver The driver value pointer. Set this pointer to NULL to indicate that time drives the animation curve.

void FCDAnimationCurve::SetDriverPointer const string &  p  )  [inline]
 

[INTERNAL] Sets the target pointer prefix of the driver.

Parameters:
p The driver's target pointer prefix. Set this string to the empty string if the input of the animation curve is the time.

void FCDAnimationCurve::SetPostInfinity FUDaeInfinity::Infinity  infinity  )  [inline]
 

Sets the behavior of the curve if the input value is outside the input interval defined by the curve keys and greater than any key input value.

See also:
FUDaeInfinity
Parameters:
infinity The post-infinity behavior of the curve.

void FCDAnimationCurve::SetPreInfinity FUDaeInfinity::Infinity  infinity  )  [inline]
 

Sets the behavior of the curve if the input value is outside the input interval defined by the curve keys and less than any key input value.

See also:
FUDaeInfinity
Parameters:
infinity The pre-infinity behavior of the curve.

void FCDAnimationCurve::SetTargetElement int32  e  )  [inline]
 

[INTERNAL] Sets the target element suffix for the curve.

Parameters:
e The target element suffix. Set to value to -1 if the animated element does not belong to an animated element list.

void FCDAnimationCurve::SetTargetQualifier const string &  q  )  [inline]
 

[INTERNAL] Sets the target qualifier for the curve.

Parameters:
q The target qualifier. You may sets this string to the empty string only if that the curve affects a one-dimensional animated element.

void FCDAnimationCurve::SetWeightedCurveFlag bool  _isWeightedCurve  )  [inline]
 

Sets whether this curve has weighted tangents.

Tangent weights give you access to 2D tangents by providing the length of the tangent.

Parameters:
_isWeightedCurve Whether this curve has weighted tangents.

xmlNode* FCDAnimationCurve::WriteChannelToXML xmlNode *  parentNode,
const string &  baseId,
const char *  targetPointer
const
 

[INTERNAL] Writes out the animation channel that attaches the sampling function to the animatable value.

Parameters:
parentNode The XML tree node in which to create the sampler.
baseId The COLLADA Id prefix used when generating the source ids and the sampler id.
targetPointer The target pointer prefix for the targeted animated element.
Returns:
The created XML tree node.

xmlNode* FCDAnimationCurve::WriteSamplerToXML xmlNode *  parentNode,
const string &  baseId
const
 

[INTERNAL] Writes out the sampler that puts together the data sources and generates a sampling function.

Parameters:
parentNode The XML tree node in which to create the sampler.
baseId The COLLADA id prefix used when generating the source ids. This prefix is also used to generate the sampler COLLADA id.
Returns:
The created XML tree node.

void FCDAnimationCurve::WriteSourceToXML xmlNode *  parentNode,
const string &  baseId
const
 

[INTERNAL] Writes out the data sources necessary to import the animation curve to a given XML tree node.

Parameters:
parentNode The XML tree node in which to create the data sources.
baseId A COLLADA Id prefix to use when generating the source ids.


The documentation for this class was generated from the following file:
Generated on Fri May 12 16:44:41 2006 for FCollada by  doxygen 1.4.6-NO