Static Public Member Functions | Public Attributes | Protected Member Functions | Friends

VgEngine::VgSinusoidalVectorOffsetFunctorDescriptor Class Reference

This class implements descriptors for sinusoidal animation of vectors. More...

Inheritance diagram for VgEngine::VgSinusoidalVectorOffsetFunctorDescriptor:
Inheritance graph
[legend]
Collaboration diagram for VgEngine::VgSinusoidalVectorOffsetFunctorDescriptor:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

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.

Note:
There is no period (or frequency) parameter in this descriptor, because it will be deduced from the start/end phase and the animation duration.
The valid range for phase parameters is [-inf, +inf], but the precision will be (a lot) better for values around 0. To get a full sine cycle start phase should be 0 and the end phase 2 * Pi. To get more pulsations the range should be widened, but it is better to use [-phase, +phase] than [0, 2*phase]
Version:
2.0.7729

Constructor & Destructor Documentation

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.


Member Function Documentation

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.


Friends And Related Function Documentation

friend class VgObjectBridge [friend]

Reimplemented from VgEngine::VgFunctorDescriptor.


Member Data Documentation

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).


The documentation for this class was generated from the following file:
VisioDevKit 2.0, Visioglobe® 2013