Nebula
Loading...
Searching...
No Matches
animutil.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
11#include "core/types.h"
14#include "coreanimation/animresource.h"
16#include "characters/characterjointmask.h"
17#include "jobs/job.h"
18
19//------------------------------------------------------------------------------
20namespace CoreAnimation
21{
23{
24public:
26 static void Sample(const AnimResourceId& animResource, IndexT clipIndex, SampleType::Code sampleType, Timing::Tick time, float timeFactor, const Ptr<AnimSampleBuffer>& result);
28 static Ptr<Jobs::Job> CreateSampleJob(const AnimResourceId& animResource, IndexT clipIndex, SampleType::Code sampleType, Timing::Tick time, float timeFactor, const Characters::CharacterJointMask* mask, const Ptr<AnimSampleBuffer>& result);
30 static Ptr<Jobs::Job> CreateSampleAndMixJob(const AnimResourceId& animResource, IndexT clipIndex, SampleType::Code sampleType, Timing::Tick time, float timeFactor, const Characters::CharacterJointMask* mask, float mixWeight, const Ptr<AnimSampleBuffer>& mixIn, const Ptr<AnimSampleBuffer>& result);
32 static IndexT ClampKeyIndex(IndexT keyIndex, const AnimClip& clip);
34 static Timing::Tick InbetweenTicks(Timing::Tick sampleTime, const AnimClip& clip);
35};
36
37} // namespace CoreAnimation
38//------------------------------------------------------------------------------
An animation clip is a collection of related animation curves (for instance all curves required to an...
Definition animclip.h:25
A class which contains utility methods for animation sampling and mixing.
Definition animutil.h:23
static Ptr< Jobs::Job > CreateSampleJob(const AnimResourceId &animResource, IndexT clipIndex, SampleType::Code sampleType, Timing::Tick time, float timeFactor, const Characters::CharacterJointMask *mask, const Ptr< AnimSampleBuffer > &result)
setup a job object which performs sampling
Definition animutil.cc:223
static Ptr< Jobs::Job > CreateSampleAndMixJob(const AnimResourceId &animResource, IndexT clipIndex, SampleType::Code sampleType, Timing::Tick time, float timeFactor, const Characters::CharacterJointMask *mask, float mixWeight, const Ptr< AnimSampleBuffer > &mixIn, const Ptr< AnimSampleBuffer > &result)
setup a job which performs both sampling and mixing
Definition animutil.cc:287
static IndexT ClampKeyIndex(IndexT keyIndex, const AnimClip &clip)
clamp key index into valid range
Definition animutil.cc:38
static Timing::Tick InbetweenTicks(Timing::Tick sampleTime, const AnimClip &clip)
compute inbetween ticks for a given sample time
Definition animutil.cc:75
static void Sample(const AnimResourceId &animResource, IndexT clipIndex, SampleType::Code sampleType, Timing::Tick time, float timeFactor, const Ptr< AnimSampleBuffer > &result)
OBSOLETE: sample an animation clip at some point in time into an AnimSampleBuffer.
Definition animutil.cc:117
Code
animation sample types
Definition sampletype.h:25
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
An animation resource holds a set of animations from a loaded NAX file.
Definition charactercontext.h:40
ClipStatus::Type clip(const plane &plane, const line &l, line &outClippedLine)
Definition plane.h:208
int Tick
the tick datatype (one tick == 1 millisecond)
Definition time.h:20
int IndexT
Definition types.h:48