CoreAnimation::AnimClip Class Reference
#include <animclip.h>
Detailed Description
An animation clip is a collection of related animation curves (for instance all curves required to animate a character).(C) 2008 Radon Labs GmbH
Public Member Functions | |
| AnimClip () | |
| constructor | |
| void | SetName (const Util::StringAtom &n) |
| set the name of the clip | |
| const Util::StringAtom & | GetName () const |
| get the name of the clip | |
| void | SetNumKeys (SizeT numKeys) |
| set the number of keys per animation curve in the clip | |
| SizeT | GetNumKeys () const |
| get the number of keys per animation curve in the clip | |
| void | SetKeyStride (SizeT stride) |
| set the key stride (number of float's between keys of the same curve) | |
| SizeT | GetKeyStride () const |
| get the key stride | |
| void | SetKeyDuration (Timing::Tick d) |
| set the duration of a key in ticks | |
| Timing::Tick | GetKeyDuration () const |
| get the duration of a key | |
| Timing::Tick | GetClipDuration () const |
| get the clip duration in ticks | |
| void | SetPreInfinityType (InfinityType::Code preInfinityType) |
| set the pre-infinity type | |
| InfinityType::Code | GetPreInfinityType () const |
| get the pre-infinity type | |
| void | SetPostInfinityType (InfinityType::Code postInfinityType) |
| set the post-infinity type | |
| InfinityType::Code | GetPostInfinityType () const |
| get the post-infinity type | |
| void | SetStartKeyIndex (IndexT keyIndex) |
| set start key index (actual start time of the curve) | |
| IndexT | GetStartKeyIndex () const |
| get start key index | |
| Timing::Tick | GetStartTime () const |
| get start time | |
| void | SetNumCurves (SizeT numCurves) |
| set number of curves in clip | |
| SizeT | GetNumCurves () const |
| get number of curves in clip | |
| AnimCurve & | CurveByIndex (IndexT curveIndex) const |
| access to curve by index | |
| void | BeginEvents (SizeT numEvents) |
| begin adding events | |
| void | AddEvent (const AnimEvent &event) |
| add an event | |
| void | EndEvents () |
| end adding events | |
| SizeT | GetNumEvents () const |
| get number of events in clip | |
| bool | HasEvent (const Util::StringAtom &name) const |
| return true if event exists by name | |
| const AnimEvent & | GetEventByName (const Util::StringAtom &name) const |
| get event by name | |
| const AnimEvent & | GetEventByIndex (IndexT i) const |
| get event by index | |
| SizeT | GetEventsInRange (Timing::Tick startTime, Timing::Tick endTime, IndexT &outStartEventIndex) const |
| get events in time range (return number of events and start event index) | |
| void | PrecomputeKeySliceValues () |
| pre-compute the key range values | |
| bool | AreKeySliceValuesValid () const |
| return true if PrecomputeKeySliceValues had been called | |
| IndexT | GetKeySliceFirstKeyIndex () const |
| get index of first key in clip's key range (this is the key index of the first non-static curve) | |
| SizeT | GetKeySliceByteSize () const |
| get byte size of a key slize in the clip | |
Member Function Documentation
| SizeT CoreAnimation::AnimClip::GetEventsInRange | ( | Timing::Tick | startTime, | |
| Timing::Tick | endTime, | |||
| IndexT & | outStartEventIndex | |||
| ) | const |
get events in time range (return number of events and start event index)
Get events in a specific time range. Return the number of events in the time range, and the index of the start event. This does a linear search on the event array.
| void CoreAnimation::AnimClip::PrecomputeKeySliceValues | ( | ) |
pre-compute the key range values
Precompute the 2 key slice values (first key index and key slice size). A key slice is the memory range of all curve-keys at a given key index. The numbers must be pre-computed because only non-static curves have keys in the key-slice.
| IndexT CoreAnimation::AnimClip::GetKeySliceFirstKeyIndex | ( | ) | const [inline] |
get index of first key in clip's key range (this is the key index of the first non-static curve)
NOTE: if all curves in the clip are static, then this method will return InvalidIndex, this is not an error situation!
| SizeT CoreAnimation::AnimClip::GetKeySliceByteSize | ( | ) | const [inline] |
get byte size of a key slize in the clip
NOTE: if all curves in the clip are static, then this method will return 0, this is not an error situation!