Public Member Functions | |
virtual int32 MCCOMAPI | GetParamSize () const =0 |
virtual MCCOMErr MCCOMAPI | GetParam (void *buffer, int32 type, boolean &changed) const =0 |
virtual MCCOMErr MCCOMAPI | SetParam (const void *param, int32 type)=0 |
virtual int32 MCCOMAPI | GetType () const =0 |
virtual void MCCOMAPI | Clone (I3DShKeyFrame **keyframe) const =0 |
virtual MCCOMErr MCCOMAPI | Read (TMCiostream &stream)=0 |
virtual MCCOMErr MCCOMAPI | Write (TMCiostream &stream) const =0 |
virtual MCCOMErr MCCOMAPI | Copy (const I3DShKeyFrame *from)=0 |
virtual MCCOMErr MCCOMAPI | LinearInterpolate (const real &lamda, const I3DShKeyFrame *kf1, const I3DShKeyFrame *kf2)=0 |
virtual void MCCOMAPI | ComputeOffset (I3DShKeyFrame **result, I3DShKeyFrame *keyFrame)=0 |
virtual MCCOMErr MCCOMAPI | ApplyOffset (I3DShKeyFrame *keyFrame)=0 |
virtual void MCCOMAPI | Subtract (I3DShKeyFrame *keyFrame1, I3DShKeyFrame *keyFrame2, real lambda)=0 |
virtual void MCCOMAPI | SetLink (I3DShTweenerChainLink *inLink)=0 |
virtual I3DShTweenerChainLink *MCCOMAPI | GetLinkNoAddRef ()=0 |
virtual boolean MCCOMAPI | SupportTangent () const =0 |
virtual int32 MCCOMAPI | GetDimensionCount () const =0 |
virtual void MCCOMAPI | GetDimensionValues (TMCArray< real > &values) const =0 |
virtual void MCCOMAPI | SetDimensionValues (const TMCArray< real > &values)=0 |
virtual void MCCOMAPI | CreateTangents ()=0 |
virtual void MCCOMAPI | RemoveTangents ()=0 |
virtual boolean MCCOMAPI | HaveTangents () const =0 |
virtual ETangentType MCCOMAPI | GetTangentType (int32 dimension, int32 &outTangentFlags) const =0 |
virtual void MCCOMAPI | SetTangentType (int32 dimension, ETangentType inTangentType, int32 inTangentFlags)=0 |
virtual boolean MCCOMAPI | GetTangent (int32 dimension, ETangentSide side, real &value, MicroTick &time) const =0 |
virtual void MCCOMAPI | SetTangent (int32 dimension, ETangentSide side, real value, MicroTick time)=0 |
This is the interface to access key frames. Key frames store the value of a parameter for a given frame. The key frame does not store the time which is stored in the tweener chain link (see I3DShTweenerChainLink).
Each animated parameter (I3DShParamInfo) owns a time line (I3DShParamTimeLine) which is a linked list of Tweener Chain Links (I3DShTweenerChainLink), each of them pointing to a keyframe.
The default keyframe types are:
You can derive your own keyframe class from this interface and create your keyframe type that you can register with the application (see I3DShUtilities::RegisterNewKeyFrameType)
virtual MCCOMErr MCCOMAPI I3DShKeyFrame::ApplyOffset | ( | I3DShKeyFrame * | keyFrame | ) | [pure virtual] |
Adds a value to the current keyframe
keyFrame | The keyframe that is added to this. |
virtual void MCCOMAPI I3DShKeyFrame::Clone | ( | I3DShKeyFrame ** | keyframe | ) | const [pure virtual] |
Creates a copy of the keyframe
keyframe | A pointer to the copy that is created. |
virtual void MCCOMAPI I3DShKeyFrame::ComputeOffset | ( | I3DShKeyFrame ** | result, | |
I3DShKeyFrame * | keyFrame | |||
) | [pure virtual] |
Computes the different between 2 keyframes.
result | keyFrame - (*this) | |
keyFrame | A keyframe. |
virtual MCCOMErr MCCOMAPI I3DShKeyFrame::Copy | ( | const I3DShKeyFrame * | from | ) | [pure virtual] |
Copy the value of another keyframe.
from | A pointer to the keyframe whose value is copie |
virtual void MCCOMAPI I3DShKeyFrame::CreateTangents | ( | ) | [pure virtual] |
Creates tangents for this keyframe.
Implemented in TBasicKeyFrame.
virtual int32 MCCOMAPI I3DShKeyFrame::GetDimensionCount | ( | ) | const [pure virtual] |
Returns the dimension count for this keyframe (number of curve in the graph editor). Returns 0 if this keyframe cannot be displayed as curves.
Implemented in TBasicKeyFrame.
virtual void MCCOMAPI I3DShKeyFrame::GetDimensionValues | ( | TMCArray< real > & | values | ) | const [pure virtual] |
Returns the values corresponding to the dimension of the keyframe (converted as real).
values | A pointer to an array that can store the values. |
Implemented in TBasicKeyFrame.
virtual I3DShTweenerChainLink* MCCOMAPI I3DShKeyFrame::GetLinkNoAddRef | ( | ) | [pure virtual] |
Returns a pointer to the tweener chain link that is pointing to this keyframe.
Implemented in TBasicKeyFrame.
virtual MCCOMErr MCCOMAPI I3DShKeyFrame::GetParam | ( | void * | buffer, | |
int32 | type, | |||
boolean & | changed | |||
) | const [pure virtual] |
Returns the value stored in the keyframe.
buffer | A pointer to a buffer that can store the value. | |
type | The type of the buffer (should be the same as the type of the keyframe usually although some limited conversions are possible). | |
changed | Returns true if the value that is returned is different from the value that was originally pointed to by buffer. |
virtual int32 MCCOMAPI I3DShKeyFrame::GetParamSize | ( | ) | const [pure virtual] |
Returns the size (in bytes) necessary to store the parameter.
virtual boolean MCCOMAPI I3DShKeyFrame::GetTangent | ( | int32 | dimension, | |
ETangentSide | side, | |||
real & | value, | |||
MicroTick & | time | |||
) | const [pure virtual] |
Gets the tangent for the given dimension at the given time
dimension | The dimension (must be < GetDimensionCount()). | |
side | Which tangent left or right. | |
value | The value of the tangent to be returned, | |
time | The time of the tangent to get. |
Implemented in TBasicKeyFrame.
virtual ETangentType MCCOMAPI I3DShKeyFrame::GetTangentType | ( | int32 | dimension, | |
int32 & | outTangentFlags | |||
) | const [pure virtual] |
Returns the tangent type for a given dimension.
dimension | The dimension (must be < GetDimensionCount()). | |
outTangentFlags | The flags for this tangent (see ETangentFlag). |
Implemented in TBasicKeyFrame.
virtual int32 MCCOMAPI I3DShKeyFrame::GetType | ( | ) | const [pure virtual] |
Returns the type of the keyframe.
virtual boolean MCCOMAPI I3DShKeyFrame::HaveTangents | ( | ) | const [pure virtual] |
Returns true if this keyframe have keyframes.
Implemented in TBasicKeyFrame.
virtual MCCOMErr MCCOMAPI I3DShKeyFrame::LinearInterpolate | ( | const real & | lamda, | |
const I3DShKeyFrame * | kf1, | |||
const I3DShKeyFrame * | kf2 | |||
) | [pure virtual] |
Performs a linear interpolation between two keyframes of the same type and stored the result in this keyframe.
lamda | The parameter of the interpolation (usually between 0 and 1) | |
kf1 | The keyframe that is selected when lamda is equal to 0 | |
kf2 | The keyframe that is selected when lamda is equal to 1 |
virtual MCCOMErr MCCOMAPI I3DShKeyFrame::Read | ( | TMCiostream & | stream | ) | [pure virtual] |
Reads a keyframe value from a stream.
stream |
virtual void MCCOMAPI I3DShKeyFrame::RemoveTangents | ( | ) | [pure virtual] |
Removes tangents for this keyframe.
Implemented in TBasicKeyFrame.
virtual void MCCOMAPI I3DShKeyFrame::SetDimensionValues | ( | const TMCArray< real > & | values | ) | [pure virtual] |
Sets the value corresponding to one of the dimension of this keyframe.
values | A pointer to an array that stores the values. |
Implemented in TBasicKeyFrame.
virtual void MCCOMAPI I3DShKeyFrame::SetLink | ( | I3DShTweenerChainLink * | inLink | ) | [pure virtual] |
Sets a pointer to the tweener chain link that is pointing to this keyframe.
inLink | A pointer to the tweener chain link that is pointing to this keyframe. |
Implemented in TBasicKeyFrame.
virtual MCCOMErr MCCOMAPI I3DShKeyFrame::SetParam | ( | const void * | param, | |
int32 | type | |||
) | [pure virtual] |
Sets the value that is stored in the keyframe.
param | A pointer to a buffer that stores the value. | |
type | The type of the buffer (should be the same as the type of the keyframe usually although some limited conversions are possible). |
virtual void MCCOMAPI I3DShKeyFrame::SetTangent | ( | int32 | dimension, | |
ETangentSide | side, | |||
real | value, | |||
MicroTick | time | |||
) | [pure virtual] |
Gets the left tangent for the given dimension
dimension | The dimension (must be < GetDimensionCount()). | |
side | Which tangent left or right. | |
value | The value of the tangent to be set, | |
time | The time of the tangent to set. |
Implemented in TBasicKeyFrame.
virtual void MCCOMAPI I3DShKeyFrame::SetTangentType | ( | int32 | dimension, | |
ETangentType | inTangentType, | |||
int32 | inTangentFlags | |||
) | [pure virtual] |
Sets the tangent type for a given dimension.
dimension | The dimension (must be < GetDimensionCount()). | |
inTangentType | The tangent type (see ETangentFlag). | |
inTangentFlags | The flags for this tangent (see ETangentFlag). |
Implemented in TBasicKeyFrame.
virtual void MCCOMAPI I3DShKeyFrame::Subtract | ( | I3DShKeyFrame * | keyFrame1, | |
I3DShKeyFrame * | keyFrame2, | |||
real | lambda | |||
) | [pure virtual] |
Subtract two keyframes and multiplies the result by a constant (res = (k1-k2) * lambda) The result is stored in (*this).
keyFrame1 | First operand of the substraction | |
keyFrame2 | Second operand of the substraction | |
lambda | The scaling factor. |
virtual boolean MCCOMAPI I3DShKeyFrame::SupportTangent | ( | ) | const [pure virtual] |
Returns true if this keyframe support tangents.
Implemented in TBasicKeyFrame.
virtual MCCOMErr MCCOMAPI I3DShKeyFrame::Write | ( | TMCiostream & | stream | ) | const [pure virtual] |
Write a key frame value into a stream.
stream |