2
Copyright (c) 2008-2009 NetAllied Systems GmbH
4
This file is part of COLLADAMaya.
6
Portions of the code are:
7
Copyright (c) 2005-2007 Feeling Software Inc.
8
Copyright (c) 2005-2007 Sony Computer Entertainment America
9
Copyright (c) 2004-2005 Alias Systems Corp.
11
Licensed under the MIT Open Source License,
12
for details please see LICENSE file or the website
13
http://www.opensource.org/licenses/mit-license.php
16
#ifndef __COLLADA_MAYA_ANIMATION_KEYS_H__
17
#define __COLLADA_MAYA_ANIMATION_KEYS_H__
19
#include "COLLADAMayaPrerequisites.h"
20
#include "COLLADAMayaTangentPoint.h"
21
#include "COLLADASWLibraryAnimations.h"
26
* This file contains the AnimationKey, AnimationKeyBezier and AnimationKeyTCB classes.
29
// ----------------------------------------------------------
31
This class is the base for every animation key.
34
class BaseAnimationKey
38
BaseAnimationKey() : input (-1) {}
40
/** The key input. Typically, this will be a time value, in seconds.
41
For driven curves, the dimension of this value will depend on the driver. */
44
/** The key interpolation type. */
45
COLLADASW::LibraryAnimations::InterpolationType interpolation;
48
// ----------------------------------------------------------
50
A simple animation key.
51
This class is the base for the more complex one-dimensional keys
52
and it is used directly for linear and step keys.
54
Do not create directly.
55
Instead call AnimationCurve::AddKey(LINEAR)
56
or AnimationCurve::AddKey(STEP).
59
class AnimationKey : public BaseAnimationKey
63
AnimationKey() : BaseAnimationKey (), output (-1) {}
65
/** The key output. */
69
/** Animation key list */
70
typedef std::vector<AnimationKey*> AnimationKeyList;
72
// ----------------------------------------------------------
74
An animation key with tangents values.
75
This class is used for bezier keys and soon: for hermite keys as well.
77
Do not create directly.
78
Instead call AnimationCurve::AddKey(BEZIER).
81
class AnimationKeyBezier : public AnimationKey
86
AnimationKeyBezier() : AnimationKey () {}
88
TangentPoint inTangent; /**< The incoming tangent value. */
89
TangentPoint outTangent; /**< The outcoming tangent value. */
92
// ----------------------------------------------------------
94
An animation key with tension, continuity and bias values.
95
This class is used for 3dsMax TCB keys.
97
Do not create directly.
98
Instead call AnimationCurve::AddKey(TCB).
101
class AnimationKeyTCB : public AnimationKey
107
: AnimationKey (), tension(-1), continuity(-1), bias(-1), easeIn(-1), easeOut(-1)
110
float tension; /**< The tension. */
111
float continuity; /**< The continuity. */
112
float bias; /**< The bias. */
114
float easeIn; /**< The ease-in factor. */
115
float easeOut; /**< The ease-out factor. */
118
// ----------------------------------------------------------
120
A simple multi-dimensional animation key.
121
This class is the base for the more complex multi-dimensional keys
122
and it is used directly for linear and step multi-dimensional keys.
125
class AnimationMKey : public BaseAnimationKey
132
/** Constructor. Do not use directly.
133
Instead call AnimationMultiCurve::AddKey(FUDaeInterpolation::LINEAR)
134
or AnimationMultiCurve::AddKey(FUDaeInterpolation::STEP).
135
@param dimension The number of dimension to the key output. */
136
AnimationMKey ( uint dimension );
139
virtual ~AnimationMKey();
141
/** Retrieves the number of dimensions for this key.
142
@return The number of dimensions. */
143
uint getDimension() const
148
/** The multi-dimensional key output. */
152
/** A array of multi-dimensional animation keys. */
153
typedef std::vector<AnimationMKey*> AnimationMKeyList;
155
// ----------------------------------------------------------
157
A multi-dimensional animation key with tangents values.
158
This class is used for bezier keys and soon: for hermite keys as well.
161
class AnimationMKeyBezier : public AnimationMKey
165
/** Constructor: do not use directly.
166
Instead call AnimationCurve::AddKey(FUDaeInterpolation::BEZIER).
167
@param dimension The number of dimension to the key output. */
168
AnimationMKeyBezier ( uint dimension );
171
virtual ~AnimationMKeyBezier();
173
TangentPoint* inTangent; /**< The incoming tangent value. */
174
TangentPoint* outTangent; /**< The outcoming tangent value. */
177
// ----------------------------------------------------------
179
An animation key with tension, continuity and bias values.
180
This class is used for 3dsMax TCB keys.
183
class AnimationMKeyTCB : public AnimationMKey
187
/** Constructor: do not use directly.
188
Instead call AnimationMultiCurve::AddKey(FUDaeInterpolation::TCB).
189
@param dimension The number of dimension to the key output. */
190
AnimationMKeyTCB ( uint dimension );
193
virtual ~AnimationMKeyTCB();
195
float* tension; /**< The multi-dimensional tensions. */
196
float* continuity; /**< The multi-dimensional continuities. */
197
float* bias; /**< The multi-dimensional biases. */
199
float* easeIn; /**< The multi-dimensional ease-in factors. */
200
float* easeOut; /**< The multi-dimensional ease-out factors. */
205
#endif // __COLLADA_MAYA_ANIMATION_KEYS_H__