This reference page is linked to from the following overview topics: Controller API Elements, Hit Testing.
#include <control.h>
Public Member Functions |
|
virtual void | GetValueLocalTime (TimeValue t, void *val, Interval &valid, GetSetMethod method=CTRL_ABSOLUTE)=0 |
virtual void | SetValueLocalTime (TimeValue t, void *val, int commit=1, GetSetMethod method=CTRL_ABSOLUTE)=0 |
CoreExport void | GetValue (TimeValue t, void *val, Interval &valid, GetSetMethod method=CTRL_ABSOLUTE) |
CoreExport void | SetValue (TimeValue t, void *val, int commit=1, GetSetMethod method=CTRL_ABSOLUTE) |
CoreExport bool | GetLocalTMComponents (TimeValue t, TMComponentsArg &cmpts, Matrix3Indirect &parentMatrix) |
virtual void | Extrapolate (Interval range, TimeValue t, void *val, Interval &valid, int type)=0 |
virtual void * | CreateTempValue ()=0 |
virtual void | DeleteTempValue (void *val)=0 |
virtual void | ApplyValue (void *val, void *delta)=0 |
virtual void | MultiplyValue (void *val, float m)=0 |
virtual void GetValueLocalTime | ( | TimeValue | t, |
void * | val, | ||
Interval & | valid, | ||
GetSetMethod | method =
CTRL_ABSOLUTE |
||
) | [pure virtual] |
t | The time to retrieve the value. |
val | This points to a variable to hold the computed value of the
controller at the specified time. What the plug-in needs to do to
store the value of the controller depends on the controller type.
There are six controller types as follows: float *val points to a float Point3 *val points to a Point3 Position *val points to a Point3 Rotation *val points to a Quat Scale *val points to a ScaleValue Transform *val points to a Matrix3 |
valid | The interval to update. The controllers validity interval should be intersected with this interval. This updates the interval to reflect the interval of the controller. |
method | This will always be: CTRL_ABSOLUTE . It indicates the controller should simply store its value in *val. |
virtual void SetValueLocalTime | ( | TimeValue | t, |
void * | val, | ||
int | commit = 1 , |
||
GetSetMethod | method =
CTRL_ABSOLUTE |
||
) | [pure virtual] |
t | The time to store the value. |
val | Storage for the value to set. See *val in Control::SetValue() for the possible data types passed here. |
commit | If this parameter is zero, the controller should save the value at the given time before setting the value. If commit is nonzero, the controller doesn't need to actually update its keys or tangents. See Control methods CommitValue() and RestoreValue(). |
method | One of the following values: CTRL_RELATIVE Indicates the plug-in should add the value to the existing value *val (i.e. Move/Rotate/Scale) CTRL_ABSOLUTE Indicates the plug-in should just set the value. |
CoreExport void GetValue | ( | TimeValue | t, |
void * | val, | ||
Interval & | valid, | ||
GetSetMethod | method =
CTRL_ABSOLUTE |
||
) | [virtual] |
Implements Control.
CoreExport void SetValue | ( | TimeValue | t, |
void * | val, | ||
int | commit = 1 , |
||
GetSetMethod | method =
CTRL_ABSOLUTE |
||
) | [virtual] |
Implements Control.
CoreExport bool GetLocalTMComponents | ( | TimeValue | t, |
TMComponentsArg & | cmpts, | ||
Matrix3Indirect & | parentMatrix | ||
) | [virtual] |
t | The time at which to get the local TM components. |
cmpts | See Structure TMComponentsArgs. |
parentMatrix | The parent matrix. Note the definition: LocalMatrix = WorldMatrix * ParentWorldMatrix^(-1) |
Reimplemented from Control.
virtual void Extrapolate | ( | Interval | range, |
TimeValue | t, | ||
void * | val, | ||
Interval & | valid, | ||
int | type | ||
) | [pure virtual] |
range | The range that must be extrapolated. |
t | The time outside the range to extrapolate. |
val | Storage for the extrapolated value. See *val in GetValueLocalTime() for the possible data types passed here. |
valid | The validity interval of the extrapolated value. |
type | See Out of Range Types. |
INTERP_CONT_TEMPLATE void InterpControl<INTERP_CONT_PARAMS>::Extrapolate(Interval range,TimeValue t,void *val, Interval &valid,int type) { T val0, val1, val2, res; switch (type) { case ORT_LINEAR: if (t<range.Start()) { GetValueLocalTime(range.Start(),&val0,valid); GetValueLocalTime(range.Start()+1,&val1,valid); res = LinearExtrapolate(range.Start(),t,val0,val1,val0); } else { GetValueLocalTime(range.End()-1,&val0,valid); GetValueLocalTime(range.End(),&val1,valid); res = LinearExtrapolate(range.End(),t,val0,val1,val1); } break; case ORT_IDENTITY: if (t<range.Start()) { GetValueLocalTime(range.Start(),&val0,valid); res = IdentityExtrapolate(range.Start(),t,val0); } else { GetValueLocalTime(range.End(),&val0,valid); res = IdentityExtrapolate(range.End(),t,val0); } break; case ORT_RELATIVE_REPEAT: GetValueLocalTime(range.Start(),&val0,valid); GetValueLocalTime(range.End(),&val1,valid); GetValueLocalTime(CycleTime(range,t),&val2,valid); res = RepeatExtrapolate(range,t,val0,val1,val2); break; } valid.Set(t,t); *((T*)val) = res; }
virtual void* CreateTempValue | ( | ) | [pure virtual] |
virtual void DeleteTempValue | ( | void * | val | ) | [pure virtual] |
val | Points to the memory allocated by CreateTempValue(). |
virtual void ApplyValue | ( | void * | val, |
void * | delta | ||
) | [pure virtual] |
val | The value to update. |
delta | The value to apply. |
virtual void MultiplyValue | ( | void * | val, |
float | m | ||
) | [pure virtual] |
val | The value to update. |
m | The scalar value to multiply *val by. |