|
Nebula
|
An animation resource holds a set of animations from a loaded NAX file.
An anim sample mask controls which samples should be used, and which should be avoided.
Classes | |
| struct | AnimationCreateInfo |
| struct | AnimationId |
| class | AnimationLoader |
| struct | AnimationResourceId |
| class | AnimClip |
| An animation clip is a collection of related animation curves (for instance all curves required to animate a character). More... | |
| class | AnimCurve |
| An animation curve describes a set of animation keys in an AnimKeyBuffer. More... | |
| class | AnimEvent |
| An animation event associates a name with a point in time. More... | |
| class | AnimEventEmitter |
| The AnimEventEmitter collects all animevents which are active in the given time range. More... | |
| class | AnimKeyBuffer |
| A simple buffer of vec4 animation keys. More... | |
| class | AnimSampleBuffer |
| Stores the result of an animation sampling operation, stores samples key values and sample-counts which keep track of the number of samples which contributed to a mixing result (this is necessary for correct mixing of partial animations). More... | |
| struct | AnimSampleMask |
| class | AnimSampleMixInfo |
| A data structure for providing sample/mixing attributes to asynchronous jobs in the CoreAnimation subsystem. More... | |
| class | AnimUtil |
| A class which contains utility methods for animation sampling and mixing. More... | |
| class | CurveType |
| Describes the general data type of the keys stored in an animation curve. More... | |
| class | InfinityType |
| Describes how time position outsides of an animation curve's scope are handled. More... | |
| struct | Nax2Curve |
| struct | Nax2Group |
| struct | Nax2Header |
| legacy NAX2 file format structs More... | |
| struct | Nax3Anim |
| struct | Nax3AnimEvent |
| struct | Nax3Clip |
| struct | Nax3Curve |
| struct | Nax3Header |
| NAX3 file format structs. More... | |
| struct | Nax3Interval |
| class | SampleType |
| Describes how an animation curve should be sampled. More... | |
Typedefs | |
| typedef Ids::IdAllocator< Util::FixedArray< AnimClip >, Util::FixedArray< AnimCurve >, Util::FixedArray< AnimEvent >, Util::HashTable< Util::StringAtom, IndexT, 32 >, Ptr< AnimKeyBuffer > > | AnimAllocator |
| typedef Ids::IdAllocator< Util::FixedArray< AnimationId > > | AnimationResourceAllocator |
Enumerations | |
| enum | { Anim_Clips , Anim_Curves , Anim_Events , Anim_ClipIndices , Anim_KeyBuffer } |
Functions | |
| void | AnimSampleJob (SizeT totalJobs, SizeT groupSize, IndexT groupIndex, SizeT invocationOffset, void *ctx) |
| void | AnimSampleJobWithMix (SizeT totalJobs, SizeT groupSize, IndexT groupIndex, SizeT invocationOffset, void *ctx) |
| const AnimationId | CreateAnimation (const AnimationCreateInfo &info) |
| Create animation resource. | |
| void | DestroyAnimation (const AnimationId id) |
| Destroy animation resource. | |
| const Util::FixedArray< AnimClip > & | AnimGetClips (const AnimationId &id) |
| Get clips. | |
| const AnimClip & | AnimGetClip (const AnimationId &id, const IndexT index) |
| Get single clip. | |
| const Ptr< AnimKeyBuffer > & | AnimGetBuffer (const AnimationId &id) |
| Get anim buffer. | |
| const Util::FixedArray< AnimCurve > & | AnimGetCurves (const AnimationId &id) |
| Get curves. | |
| const Util::FixedArray< AnimEvent > & | AnimGetEvents (const AnimationId &id) |
| Get events, the ones of a clip start at its first event. | |
| const IndexT | AnimGetIndex (const AnimationId &id, const Util::StringAtom &name) |
| Get anim clip index. | |
| AnimKeyBuffer::Interval | FindNextInterval (const AnimCurve &curve, const Timing::Tick time, uint &key, const AnimKeyBuffer::Interval *sampleTimes) |
| void | AnimSampleStep (const AnimClip &clip, const Util::FixedArray< AnimCurve > &curves, const Timing::Tick time, const Math::vec4 &velocityScale, const Util::FixedArray< Math::vec4 > &idleSamples, const float *srcSamplePtr, const AnimKeyBuffer::Interval *intervalPtr, uint *outSampleKeyPtr, float *outSamplePtr, uchar *outSampleCounts) |
| void | AnimSampleLinear (const AnimClip &clip, const Util::FixedArray< AnimCurve > &curves, const Timing::Tick time, const Math::vec4 &velocityScale, const Util::FixedArray< Math::vec4 > &idleSamples, const float *srcSamplePtr, const AnimKeyBuffer::Interval *intervalPtr, uint *outSampleKeyPtr, float *outSamplePtr, uchar *outSampleCounts) |
| void | AnimMix (const AnimClip &clip, const Util::FixedArray< AnimCurve > &curves, const AnimSampleMask *mask, float mixWeight, const float *src0SamplePtr, const float *src1SamplePtr, const uchar *src0SampleCounts, const uchar *src1SampleCounts, float *outSamplePtr, uchar *outSampleCounts) |
| Mix the samples of a clip, src1, over others, src0. | |
| __ImplementClass (CoreAnimation::AnimationLoader, 'SANL', Resources::ResourceLoader) | |
| static bool | LoadAnimations (const Ptr< IO::Stream > &stream, Util::FixedArray< CoreAnimation::AnimationId > &outAnimations) |
| const AnimationId | AnimationResourceGetAnimation (const AnimationResourceId id, IndexT index) |
| Get animation from resource. | |
| void | DestroyAnimationResource (const AnimationResourceId id) |
| Destroy animation resource. | |
| bool | operator== (const AnimEvent &a, const AnimEvent &b) |
| bool | operator!= (const AnimEvent &a, const AnimEvent &b) |
| bool | operator< (const AnimEvent &a, const AnimEvent &b) |
| bool | operator> (const AnimEvent &a, const AnimEvent &b) |
| bool | operator<= (const AnimEvent &a, const AnimEvent &b) |
| bool | operator>= (const AnimEvent &a, const AnimEvent &b) |
| __ImplementClass (CoreAnimation::AnimKeyBuffer, 'ANKB', Core::RefCounted) | |
| Timing::Tick | WrapTime (const AnimCurve &curve, Timing::Tick time, Timing::Tick lastTime) |
| void | AnimSampleJobFunc (const JobFuncContext &ctx) |
| This job function only performs sampling, not mixing. | |
| void | AnimSampleMixJobFunc (const JobFuncContext &ctx) |
| Performs both animation sampling, and mixing with another sample buffer in a single job. | |
| void | AnimJobUtilSampleStep (const AnimCurve *curves, int numCurves, const float4 &velocityScale, const float4 *src0SamplePtr, float4 *outSamplePtr, uchar *outSampleCounts) |
| Sampler for "step" interpolation type. | |
| void | AnimJobUtilSampleLinear (const AnimCurve *curves, int numCurves, float sampleWeight, const float4 &velocityScale, const float4 *src0SamplePtr, const float4 *src1SamplePtr, float4 *outSamplePtr, uchar *outSampleCounts) |
| Sampler for "linear" interpolation type. | |
| void | AnimJobUtilMix (const AnimCurve *curves, int numCurves, const Characters::CharacterJointMask *mask, float mixWeight, const float4 *src0SamplePtr, const float4 *src1SamplePtr, const uchar *src0SampleCounts, const uchar *src1SampleCounts, float4 *outSamplePtr, uchar *outSampleCounts) |
| Mixes 2 source sample buffers into a destination sample buffer using a single lerp-value between 0.0 and 1.0. | |
Variables | |
| AnimAllocator | animAllocator |
| AnimationResourceAllocator | animationResourceAllocator |
| CoreAnimation::__ImplementClass | ( | CoreAnimation::AnimationLoader | , |
| 'SANL' | , | ||
| Resources::ResourceLoader | ) |
| const AnimationId CoreAnimation::AnimationResourceGetAnimation | ( | const AnimationResourceId | id, |
| IndexT | index ) |
Get animation from resource.
| const Ptr< AnimKeyBuffer > & CoreAnimation::AnimGetBuffer | ( | const AnimationId & | id | ) |
Get anim buffer.
| const AnimClip & CoreAnimation::AnimGetClip | ( | const AnimationId & | id, |
| const IndexT | index ) |
Get single clip.
| const Util::FixedArray< AnimClip > & CoreAnimation::AnimGetClips | ( | const AnimationId & | id | ) |
Get clips.
| const Util::FixedArray< AnimCurve > & CoreAnimation::AnimGetCurves | ( | const AnimationId & | id | ) |
Get curves.
| const Util::FixedArray< AnimEvent > & CoreAnimation::AnimGetEvents | ( | const AnimationId & | id | ) |
Get events, the ones of a clip start at its first event.
| const IndexT CoreAnimation::AnimGetIndex | ( | const AnimationId & | id, |
| const Util::StringAtom & | name ) |
Get anim clip index.
|
inline |
Mixes 2 source sample buffers into a destination sample buffer using a single lerp-value between 0.0 and 1.0.
Mixing takes sample counts into consideration. A source sample count of 0 indicates, the this sample is not valid and the result is made of 100% of the other sample. If both source samples are valid, the result is blended from both source samples. This gives the expected results when an animation clip only manipulates parts of a character skeleton.
NOTE: the output data blocks may be identical with one of the input data blocks!
|
inline |
Sampler for "linear" interpolation type.
|
inline |
Sampler for "step" interpolation type.
|
extern |
Mix the samples of a clip, src1, over others, src0.
The samples are a translation, rotation and scale per joint, the curves of the clip in that order. Each joint is mixed by the weight times the mask's weight of the joint. Curves of src1 without keys keep src0
|
extern |
|
extern |
This job function only performs sampling, not mixing.
This is usually called for the first anim job of a mixing chain.
|
extern |
|
extern |
|
extern |
Performs both animation sampling, and mixing with another sample buffer in a single job.
|
extern |
| const AnimationId CoreAnimation::CreateAnimation | ( | const AnimationCreateInfo & | info | ) |
Create animation resource.
| void CoreAnimation::DestroyAnimation | ( | const AnimationId | id | ) |
Destroy animation resource.
| void CoreAnimation::DestroyAnimationResource | ( | const AnimationResourceId | id | ) |
Destroy animation resource.
|
extern |
|
static |
|
inline |
| AnimAllocator CoreAnimation::animAllocator |
| AnimationResourceAllocator CoreAnimation::animationResourceAllocator |