This class implements descriptors for sinusoidal animation of vectors. More...
Static Public Member Functions | |
static VgRefPtr < VgSinusoidalVectorOffsetFunctorDescriptor > | create () |
This static method returns a new heap-allocated descriptor. | |
Public Attributes | |
float | mBaseVector [3] |
The base vector. | |
float | mVector [3] |
The vector along which we will animate (in local metric frame). | |
double | mStartPhase |
The sine function start phase (in radians). | |
double | mEndPhase |
The sine function end phase (in radians). | |
Protected Member Functions | |
VgSinusoidalVectorOffsetFunctorDescriptor () | |
Class constructor. | |
virtual | ~VgSinusoidalVectorOffsetFunctorDescriptor () |
Class destructor. | |
Friends | |
class | VgObjectBridge |
This class implements descriptors for sinusoidal animation of vectors.
The sinusoidal vector animation will apply an offset vector weighted by a sinusoidal time-dependent function. The functors described by this class can be used for all animations channels that manage vectors as values. Formula is the following : f(t) = mBaseVector + sin(mStartPhase + t/mDuration * (mEndPhase-mStartPhase)) * mOffsetVector.
VgEngine::VgSinusoidalVectorOffsetFunctorDescriptor::VgSinusoidalVectorOffsetFunctorDescriptor | ( | ) | [protected] |
Class constructor.
This can't be called publicly, instances must be obtained through the VgSinusoidalVectorOffsetFunctorDescriptor::create method.
virtual VgEngine::VgSinusoidalVectorOffsetFunctorDescriptor::~VgSinusoidalVectorOffsetFunctorDescriptor | ( | ) | [protected, virtual] |
Class destructor.
static VgRefPtr< VgSinusoidalVectorOffsetFunctorDescriptor > VgEngine::VgSinusoidalVectorOffsetFunctorDescriptor::create | ( | ) | [static] |
This static method returns a new heap-allocated descriptor.
It is the only method that should be used to instantiate new descriptors. It is a way to make sure no one will delete it, except the last VgRefPtr pointing to it.
friend class VgObjectBridge [friend] |
Reimplemented from VgEngine::VgFunctorDescriptor.
The base vector.
The sine function end phase (in radians).
The sine function start phase (in radians).
The vector along which we will animate (in local metric frame).