Classes | Defines | Enumerations | Functions | Variables

control.h File Reference

This reference page is linked to from the following overview topics: CTRL_RELATIVE and CTRL_ABSOLUTE.


#include "maxheap.h"
#include "plugapi.h"
#include "assert1.h"
#include "matrix3.h"
#include "quat.h"
#include "interval.h"
#include "ref.h"
#include "box3.h"
#include "bitarray.h"
#include "AnimPropertyID.h"

Go to the source code of this file.

Classes

class   ScaleValue
struct   TMComponentsArg
class   Matrix3Indirect
class   DelayedMatrix3
struct   DelayedMatrix3::DelayedOp
struct   DelayedMatrix3::OpQueue
class   DelayedNodeMat
class   EaseCurveList
class   EaseCurveAnimProp
class   MultCurveList
class   MultCurveAnimProp
class   CtrlHitRecord
  class CtrlHitRecord More...
class   CtrlHitLog
  class CtrlHitLog More...
class   IKEnumCallback
class   IKDeriv
class   IKClipObject
class   InitJointData
class   InitJointData2
class   InitJointData3
 

class InitJointData3 : public InitJointData2

More...
class   DOFParams
class   Control
class   StdControl
class   SetXFormPacket
class   SetMorphTargetPacket
class   MorphControl
class   MasterPointControl
struct   Slot
class   TempStore

Defines

#define  ORT_BEFORE   1
#define  ORT_AFTER   2
#define  ORT_CONSTANT   1
  Tracks values before or after the range of keys remains constant.
#define  ORT_CYCLE   2
  Causes the key pattern to repeat cyclically.
#define  ORT_LOOP   3
  The same as ORT_CYCLE with continuity.
#define  ORT_OSCILLATE   4
  This reverses the range of keys values to cause the pattern to oscillate.
#define  ORT_LINEAR   5
  Takes the slope at the end key in the range and extrapolate with that slope.
#define  ORT_IDENTITY   6
  This only is used when mapping time to time.
#define  ORT_RELATIVE_REPEAT   7
  Causes the key pattern to repeat with the first key taking off where the last key left off.
#define  KEY_MODE_NO_BUFFER   1
#define  GetEaseListInterface(anim)   ((EaseCurveList*)anim->GetInterface(I_EASELIST))
#define  GetMultListInterface(anim)   ((MultCurveList*)anim->GetInterface(I_MULTLIST))
#define  POSITION_DERIV   (1<<0)
#define  ROTATION_DERIV   (1<<1)
#define  COPYPASTE_IKPOS   1
#define  COPYPASTE_IKROT   2
#define  DEF_SPRINGTENS   (0.02f)
#define  CONTROLBASE_CHUNK   0x8499
#define  INORT_CHUNK   0x3000
#define  OUTORT_CHUNK   0x3001
#define  CONT_DISABLED_CHUNK   0x3002
#define  CONT_FLAGS_CHUNK   0x3003
#define  INHERIT_POS_X   (1<<0)
#define  INHERIT_POS_Y   (1<<1)
#define  INHERIT_POS_Z   (1<<2)
#define  INHERIT_ROT_X   (1<<3)
#define  INHERIT_ROT_Y   (1<<4)
#define  INHERIT_ROT_Z   (1<<5)
#define  INHERIT_SCL_X   (1<<6)
#define  INHERIT_SCL_Y   (1<<7)
#define  INHERIT_SCL_Z   (1<<8)
#define  INHERIT_ALL   511

Enumerations

enum   GetSetMethod { CTRL_RELATIVE, CTRL_ABSOLUTE }
enum   SetXFormCommand { XFORM_MOVE, XFORM_ROTATE, XFORM_SCALE, XFORM_SET }

Functions

CoreExport void  ApplyScaling (Matrix3 &m, const ScaleValue &v)
CoreExport void  InitControlLists ()
CoreExport ScaleValue  operator+ (const ScaleValue &s0, const ScaleValue &s1)
CoreExport ScaleValue  operator- (const ScaleValue &s0, const ScaleValue &s1)
CoreExport ScaleValue  operator* (const ScaleValue &s, float f)
CoreExport ScaleValue  operator* (float f, const ScaleValue &s)
CoreExport ScaleValue  operator+ (const ScaleValue &s, float f)
CoreExport ScaleValue  operator+ (float f, const ScaleValue &s)
bool  IsInitJointData3 (InitJointData2 *jd)
InitJointData3 DowncastToJointData3 (InitJointData2 *jd)
TimeValue  CycleTime (Interval i, TimeValue t)
int  NumCycles (Interval i, TimeValue t)
template<class T >
LinearExtrapolate (TimeValue t0, TimeValue t1, T &val0, T &val1, T &endVal)
template<class T >
RepeatExtrapolate (Interval range, TimeValue t, T &startVal, T &endVal, T &cycleVal)
template<class T >
IdentityExtrapolate (TimeValue endPoint, TimeValue t, T &endVal)
CoreExport Quat  LinearExtrapolate (TimeValue t0, TimeValue t1, Quat &val0, Quat &val1, Quat &endVal)
CoreExport Quat  RepeatExtrapolate (Interval range, TimeValue t, Quat &startVal, Quat &endVal, Quat &cycleVal)
CoreExport Quat  IdentityExtrapolate (TimeValue endPoint, TimeValue t, Quat &endVal)
CoreExport ScaleValue  LinearExtrapolate (TimeValue t0, TimeValue t1, ScaleValue &val0, ScaleValue &val1, ScaleValue &endVal)
CoreExport ScaleValue  RepeatExtrapolate (Interval range, TimeValue t, ScaleValue &startVal, ScaleValue &endVal, ScaleValue &cycleVal)
CoreExport ScaleValue  IdentityExtrapolate (TimeValue endPoint, TimeValue t, ScaleValue &endVal)
template<class T >
LinearInterpolate (const T &v0, const T &v1, float u)
Quat  LinearInterpolate (const Quat &v0, const Quat &v1, float u)
ScaleValue  LinearInterpolate (const ScaleValue &v0, const ScaleValue &v1, float u)
Interval  TestInterval (Interval iv, DWORD flags)
Quat  ScaleQuat (Quat q, float s)
CoreExport int  Animating ()
CoreExport void  AnimateOn ()
CoreExport void  AnimateOff ()
CoreExport void  SuspendAnimate ()
CoreExport void  ResumeAnimate ()
CoreExport BOOL  AreWeAnimating (const TimeValue &t)
CoreExport BOOL  AreWeKeying (const TimeValue &t)
CoreExport TimeValue  GetAnimStart ()
CoreExport TimeValue  GetAnimEnd ()
CoreExport void  SetAnimStart (TimeValue s)
CoreExport void  SetAnimEnd (TimeValue e)
CoreExport Control NewDefaultFloatController ()
CoreExport Control NewDefaultPoint3Controller ()
CoreExport Control NewDefaultMatrix3Controller ()
CoreExport Control NewDefaultPositionController ()
CoreExport Control NewDefaultRotationController ()
CoreExport Control NewDefaultScaleController ()
CoreExport Control NewDefaultBoolController ()
CoreExport Control NewDefaultColorController ()
CoreExport Control NewDefaultMasterPointController ()
CoreExport Control NewDefaultPoint4Controller ()
CoreExport Control NewDefaultFRGBAController ()
CoreExport Control NewDefaultPoint2Controller ()
CoreExport Control CreateInterpFloat ()
CoreExport Control CreateInterpPosition ()
CoreExport Control CreateInterpPoint3 ()
CoreExport Control CreateInterpRotation ()
CoreExport Control CreateInterpScale ()
CoreExport Control CreatePRSControl ()
CoreExport Control CreateLookatControl ()
CoreExport Control CreateMasterPointControl ()
CoreExport Control CreateInterpPoint4 ()
CoreExport Control CreateInterpPoint2 ()
CoreExport void  SetDefaultController (SClass_ID sid, ClassDesc *desc)
CoreExport ClassDesc GetDefaultController (SClass_ID sid)
CoreExport void  SetDefaultColorController (ClassDesc *desc)
CoreExport void  SetDefaultFRGBAController (ClassDesc *desc)
CoreExport void  SetDefaultBoolController (ClassDesc *desc)
CoreExport BOOL  GetSetKeyMode ()
CoreExport void  SetSetKeyMode (BOOL onOff)
CoreExport void  SuspendSetKeyMode ()
CoreExport void  ResumeSetKeyMode ()
CoreExport BOOL  GetSetKeySuspended ()
CoreExport BOOL  GetSetKeyModeStatus ()
CoreExport BOOL  IsSetKeyModeFeatureEnabled ()

Variables

const DWORD  bJointData3 = (1 << 0)
CoreExport TempStore  tmpStore

Define Documentation

#define ORT_BEFORE   1

Definition at line 105 of file control.h.

#define ORT_AFTER   2

Definition at line 106 of file control.h.

#define KEY_MODE_NO_BUFFER   1

Definition at line 129 of file control.h.

#define GetEaseListInterface (   anim )    ((EaseCurveList*)anim->GetInterface(I_EASELIST))

Definition at line 500 of file control.h.

#define GetMultListInterface (   anim )    ((MultCurveList*)anim->GetInterface(I_MULTLIST))

Definition at line 608 of file control.h.

#define POSITION_DERIV   (1<<0)

Definition at line 777 of file control.h.

#define ROTATION_DERIV   (1<<1)

Definition at line 778 of file control.h.

#define COPYPASTE_IKPOS   1

Definition at line 805 of file control.h.

#define COPYPASTE_IKROT   2

Definition at line 806 of file control.h.

#define DEF_SPRINGTENS   (0.02f)
#define CONTROLBASE_CHUNK   0x8499

Definition at line 982 of file control.h.

#define INORT_CHUNK   0x3000

Definition at line 983 of file control.h.

#define OUTORT_CHUNK   0x3001

Definition at line 984 of file control.h.

#define CONT_DISABLED_CHUNK   0x3002

Definition at line 985 of file control.h.

#define CONT_FLAGS_CHUNK   0x3003

Definition at line 986 of file control.h.

#define INHERIT_POS_X   (1<<0)

Definition at line 989 of file control.h.

#define INHERIT_POS_Y   (1<<1)

Definition at line 990 of file control.h.

#define INHERIT_POS_Z   (1<<2)

Definition at line 991 of file control.h.

#define INHERIT_ROT_X   (1<<3)

Definition at line 992 of file control.h.

#define INHERIT_ROT_Y   (1<<4)

Definition at line 993 of file control.h.

#define INHERIT_ROT_Z   (1<<5)

Definition at line 994 of file control.h.

#define INHERIT_SCL_X   (1<<6)

Definition at line 995 of file control.h.

#define INHERIT_SCL_Y   (1<<7)

Definition at line 996 of file control.h.

#define INHERIT_SCL_Z   (1<<8)

Definition at line 997 of file control.h.

#define INHERIT_ALL   511

Definition at line 998 of file control.h.


Enumeration Type Documentation

Enumerator:
CTRL_RELATIVE 
CTRL_ABSOLUTE 

Definition at line 978 of file control.h.


Function Documentation

CoreExport void ApplyScaling ( Matrix3 m,
const ScaleValue v 
)
CoreExport void InitControlLists ( )
CoreExport ScaleValue operator+ ( const ScaleValue s0,
const ScaleValue s1 
)
Remarks:
Returns the sum of two ScaleValues. This still multiplies since scale values are multiplicative not additive.
CoreExport ScaleValue operator- ( const ScaleValue s0,
const ScaleValue s1 
)
Remarks:
Returns the difference of two ScaleValues.
CoreExport ScaleValue operator* ( const ScaleValue s,
float  f 
)
Remarks:
Multiplication of a ScaleValue and a float.
CoreExport ScaleValue operator* ( float  f,
const ScaleValue s 
)
Remarks:
Multiplication of a ScaleValue and a float.
CoreExport ScaleValue operator+ ( const ScaleValue s,
float  f 
)
Remarks:
Returns the sum of a ScaleValue and a float. This adds f to s.x, s.y, and s.z.
CoreExport ScaleValue operator+ ( float  f,
const ScaleValue s 
)
Remarks:
Returns the sum of a ScaleValue and a float.
bool IsInitJointData3 ( InitJointData2 jd ) [inline]

Definition at line 912 of file control.h.

{
  return (jd->flags & bJointData3);
}
InitJointData3* DowncastToJointData3 ( InitJointData2 jd ) [inline]

Definition at line 917 of file control.h.

{
  return IsInitJointData3(jd) ? (InitJointData3*)jd : NULL;
}
TimeValue CycleTime ( Interval  i,
TimeValue  t 
) [inline]

Definition at line 3052 of file control.h.

   {
   int res, dur = i.Duration()-1;
   if (dur<=0) return t;      
   res   = (t-i.Start())%dur;
   if (t<i.Start()) {
      return i.End()+res;
   } else {
      return i.Start()+res;
      }
   }
int NumCycles ( Interval  i,
TimeValue  t 
) [inline]

Definition at line 3064 of file control.h.

   {
   int dur = i.Duration()-1;
   if (dur<=0) return 1;
   if (t<i.Start()) {
      return (abs(t-i.Start())/dur)+1;
   } else 
   if (t>i.End()) {
      return (abs(t-i.End())/dur)+1;
   } else {
      return 0;
      }
   }
T LinearExtrapolate ( TimeValue  t0,
TimeValue  t1,
T &  val0,
T &  val1,
T &  endVal 
)

Definition at line 3083 of file control.h.

{
    return (T)(endVal + (val1-val0) * float(t1-t0));
}
T RepeatExtrapolate ( Interval  range,
TimeValue  t,
T &  startVal,
T &  endVal,
T &  cycleVal 
)

Definition at line 3088 of file control.h.

{
    int cycles = NumCycles(range,t);
    T delta;
    if (t<range.Start()) {
        delta = startVal - endVal;
    } else {
        delta = endVal - startVal;
    }
    return (T)(cycleVal + delta * float(cycles));
}
T IdentityExtrapolate ( TimeValue  endPoint,
TimeValue  t,
T &  endVal 
)

Definition at line 3104 of file control.h.

{
    return (T)(endVal + float(t-endPoint));
}
CoreExport Quat LinearExtrapolate ( TimeValue  t0,
TimeValue  t1,
Quat val0,
Quat val1,
Quat endVal 
)
CoreExport Quat RepeatExtrapolate ( Interval  range,
TimeValue  t,
Quat startVal,
Quat endVal,
Quat cycleVal 
)
CoreExport Quat IdentityExtrapolate ( TimeValue  endPoint,
TimeValue  t,
Quat endVal 
)
CoreExport ScaleValue LinearExtrapolate ( TimeValue  t0,
TimeValue  t1,
ScaleValue val0,
ScaleValue val1,
ScaleValue endVal 
)
CoreExport ScaleValue RepeatExtrapolate ( Interval  range,
TimeValue  t,
ScaleValue startVal,
ScaleValue endVal,
ScaleValue cycleVal 
)
CoreExport ScaleValue IdentityExtrapolate ( TimeValue  endPoint,
TimeValue  t,
ScaleValue endVal 
)
T LinearInterpolate ( const T &  v0,
const T &  v1,
float  u 
)

Definition at line 3118 of file control.h.

{
    return (T)((1.0f-u)*v0 + u*v1);
}
Quat LinearInterpolate ( const Quat v0,
const Quat v1,
float  u 
) [inline]

Definition at line 3124 of file control.h.

   {
   return Slerp(v0,v1,u);
   }
ScaleValue LinearInterpolate ( const ScaleValue v0,
const ScaleValue v1,
float  u 
) [inline]

Definition at line 3130 of file control.h.

   {
   ScaleValue res;
   res.s = ((float)1.0-u)*v0.s + u*v1.s;
   res.q = Slerp(v0.q,v1.q,u);
   return res;
   }
Interval TestInterval ( Interval  iv,
DWORD  flags 
) [inline]

Definition at line 3139 of file control.h.

   {
   TimeValue start = iv.Start();
   TimeValue end = iv.End();
   if (!(flags&TIME_INCLEFT)) {
      start++;
      }  
   if (!(flags&TIME_INCRIGHT)) {
      end--;
      }
   if (end<start) {
      iv.SetEmpty();
   } else {
      iv.Set(start,end);
      }
   return iv;  
   }
Quat ScaleQuat ( Quat  q,
float  s 
) [inline]

Definition at line 3157 of file control.h.

   {
   float angle;
   Point3 axis;
   AngAxisFromQ(q,&angle,axis);
   return QFromAngAxis(angle*s,axis);
   }
CoreExport int Animating ( )
CoreExport void AnimateOn ( )
CoreExport void AnimateOff ( )
CoreExport void SuspendAnimate ( )
CoreExport void ResumeAnimate ( )
CoreExport BOOL AreWeAnimating ( const TimeValue t )
CoreExport BOOL AreWeKeying ( const TimeValue t )
CoreExport TimeValue GetAnimStart ( )
CoreExport TimeValue GetAnimEnd ( )
CoreExport void SetAnimStart ( TimeValue  s )
CoreExport void SetAnimEnd ( TimeValue  e )
CoreExport Control* NewDefaultFloatController ( )
CoreExport Control* NewDefaultPoint3Controller ( )
CoreExport Control* NewDefaultMatrix3Controller ( )
CoreExport Control* NewDefaultPositionController ( )
CoreExport Control* NewDefaultRotationController ( )
CoreExport Control* NewDefaultScaleController ( )
CoreExport Control* NewDefaultBoolController ( )
CoreExport Control* NewDefaultColorController ( )
CoreExport Control* NewDefaultMasterPointController ( )
CoreExport Control* NewDefaultPoint4Controller ( )
CoreExport Control* NewDefaultFRGBAController ( )
CoreExport Control* NewDefaultPoint2Controller ( )
CoreExport Control* CreateInterpFloat ( )
CoreExport Control* CreateInterpPosition ( )
CoreExport Control* CreateInterpPoint3 ( )
CoreExport Control* CreateInterpRotation ( )
CoreExport Control* CreateInterpScale ( )
CoreExport Control* CreatePRSControl ( )
CoreExport Control* CreateLookatControl ( )
CoreExport Control* CreateMasterPointControl ( )
CoreExport Control* CreateInterpPoint4 ( )
CoreExport Control* CreateInterpPoint2 ( )
CoreExport void SetDefaultController ( SClass_ID  sid,
ClassDesc desc 
)
CoreExport ClassDesc* GetDefaultController ( SClass_ID  sid )
CoreExport void SetDefaultColorController ( ClassDesc desc )
CoreExport void SetDefaultFRGBAController ( ClassDesc desc )
CoreExport void SetDefaultBoolController ( ClassDesc desc )
CoreExport BOOL GetSetKeyMode ( )
CoreExport void SetSetKeyMode ( BOOL  onOff )
CoreExport void SuspendSetKeyMode ( )
CoreExport void ResumeSetKeyMode ( )
CoreExport BOOL GetSetKeySuspended ( )
CoreExport BOOL GetSetKeyModeStatus ( )
CoreExport BOOL IsSetKeyModeFeatureEnabled ( )

Variable Documentation

const DWORD bJointData3 = (1 << 0)

Definition at line 861 of file control.h.

CoreExport TempStore tmpStore