com.visioglobe.libVisioDevKit
Class VgSinusoidalVectorOffsetFunctorDescriptor

java.lang.Object
  extended by com.visioglobe.libVisioDevKit.VgReferenced
      extended by com.visioglobe.libVisioDevKit.VgFunctorDescriptor
          extended by com.visioglobe.libVisioDevKit.VgSinusoidalVectorOffsetFunctorDescriptor

public class VgSinusoidalVectorOffsetFunctorDescriptor
extends VgFunctorDescriptor

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]

Field Summary
 
Fields inherited from class com.visioglobe.libVisioDevKit.VgReferenced
swigCMemOwn, swigRefPtr
 
Constructor Summary
VgSinusoidalVectorOffsetFunctorDescriptor(long cPtr, boolean cMemoryOwn)
          Class constructor.
 
Method Summary
static VgSinusoidalVectorOffsetFunctorDescriptorRefPtr create()
          This static method returns a new heap-allocated descriptor.
 void delete()
           
static long getCPtr(VgSinusoidalVectorOffsetFunctorDescriptor obj)
           
 float[] getMBaseVector()
          The base vector.
 double getMEndPhase()
          The sine function end phase (in radians).
 double getMStartPhase()
          The sine function start phase (in radians).
 float[] getMVector()
          The vector along which we will animate (in local metric frame).
 void setMBaseVector(float[] value)
          The base vector.
 void setMEndPhase(double value)
          The sine function end phase (in radians).
 void setMStartPhase(double value)
          The sine function start phase (in radians).
 void setMVector(float[] value)
          The vector along which we will animate (in local metric frame).
 
Methods inherited from class com.visioglobe.libVisioDevKit.VgFunctorDescriptor
finalize, getCPtr, getMEndTime, getMStartTime, setMEndTime, setMStartTime
 
Methods inherited from class com.visioglobe.libVisioDevKit.VgReferenced
getCPtr, getNbReferences, ref, unref
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VgSinusoidalVectorOffsetFunctorDescriptor

public VgSinusoidalVectorOffsetFunctorDescriptor(long cPtr,
                                                 boolean cMemoryOwn)
Class constructor. This can't be called publicly, instances must be obtained through the VgSinusoidalVectorOffsetFunctorDescriptor::create method.

Method Detail

getCPtr

public static long getCPtr(VgSinusoidalVectorOffsetFunctorDescriptor obj)

delete

public void delete()
Overrides:
delete in class VgFunctorDescriptor

create

public static VgSinusoidalVectorOffsetFunctorDescriptorRefPtr create()
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.


setMBaseVector

public void setMBaseVector(float[] value)
The base vector.


getMBaseVector

public float[] getMBaseVector()
The base vector.


setMVector

public void setMVector(float[] value)
The vector along which we will animate (in local metric frame).


getMVector

public float[] getMVector()
The vector along which we will animate (in local metric frame).


setMStartPhase

public void setMStartPhase(double value)
The sine function start phase (in radians).


getMStartPhase

public double getMStartPhase()
The sine function start phase (in radians).


setMEndPhase

public void setMEndPhase(double value)
The sine function end phase (in radians).


getMEndPhase

public double getMEndPhase()
The sine function end phase (in radians).


VisioDevKit 2.0, Visioglobe® 2013