ikctrl.h

Go to the documentation of this file.
00001 /**********************************************************************
00002  *<
00003     FILE:  ikctrl.h
00004 
00005     DESCRIPTION:  Inverse Kinematics Controllers
00006 
00007     CREATED BY:  Rolf Berteig
00008 
00009     HISTORY: 3-1-97
00010 
00011  *> Copyright (c) 1997, All Rights Reserved.
00012  **********************************************************************/
00013 #pragma once
00014 
00015 #include "ref.h"
00016 #include "control.h"
00017 
00018 #define IKMASTER_CLASSID        Class_ID(0xa91004be,0x9901fe83)
00019 #define IKSLAVE_CLASSID         Class_ID(0xbe380a31,0x310dc9e4)
00020 
00033 class IKMasterControl : public ReferenceTarget {
00034     public:
00035         Class_ID            ClassID() {return IKMASTER_CLASSID;}
00036         SClass_ID           SuperClassID() {return REF_TARGET_CLASS_ID;}
00037 
00043         virtual void        AddSlaveNode(INode *node)=0;
00045         virtual void        *GetMasterBase()=0;
00046 
00056         virtual void        SetPosThresh(float t)=0;
00066         virtual void        SetRotThresh(float t)=0;
00076         virtual void        SetIterations(int i)=0;
00086         virtual void        SetStartTime(TimeValue s)=0;
00096         virtual void        SetEndTime(TimeValue e)=0;
00097 
00101         virtual float       GetPosThresh()=0;
00105         virtual float       GetRotThresh()=0;
00109         virtual int         GetIterations()=0;
00113         virtual TimeValue   GetStartTime()=0;
00117         virtual TimeValue   GetEndTime()=0;
00118 
00119         virtual void RemoveIKChainControllers(TimeValue t)=0;
00120     };
00121 
00133 class IKSlaveControl : public Control {
00134     public:
00135         Class_ID ClassID() {return IKSLAVE_CLASSID;}
00136         SClass_ID SuperClassID() {return CTRL_MATRIX3_CLASS_ID;}
00137 
00140         virtual IKMasterControl *GetMaster()=0;
00148         virtual void SetDOF(int which,BOOL onOff)=0;
00153         virtual void SetInitPos(Point3 pos)=0;
00158         virtual void SetInitRot(Point3 rot)=0;
00179         virtual void MakeEE(BOOL onOff,DWORD which,Point3 pos,Quat rot)=0;
00180     };
00181 
00183 CoreExport IKMasterControl *CreateIKMasterControl();
00192 CoreExport IKSlaveControl *CreateIKSlaveControl(IKMasterControl *master,INode *slaveNode);
00193 
00194