Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #pragma once
00014
00015 #include "plugapi.h"
00016 #include "IKHierarchy.h"
00017
00018
00034 class IKSolver : public BaseInterfaceServer {
00035 public:
00036 typedef unsigned ReturnCondition;
00037 enum ConditionBit {
00038 bLimitReached = 0x00000001,
00039 bLimitClamped = 0x00000002,
00040 bMaxIterationReached = 0x00000004,
00041
00042
00043 bGoalTooCloseToEE = 0x00000100,
00044 bInvalidArgument = 0x00000200,
00045 bInvalidInitialValue = 0x00000400
00046 };
00047
00053 virtual SClass_ID SuperClassID() {return IK_SOLVER_CLASS_ID;}
00055 virtual Class_ID ClassID() =0;
00063 virtual void GetClassName(MSTR& s) { s= MSTR(_M("IKSolver")); }
00065 virtual ~IKSolver(){}
00066
00067
00078 virtual bool IsHistoryDependent() const =0;
00086 virtual bool DoesOneChainOnly() const =0;
00087
00098 virtual bool IsInteractive() const =0;
00103 virtual bool UseSlidingJoint() const =0;
00108 virtual bool UseSwivelAngle() const =0;
00109
00110
00117 virtual bool IsAnalytic() const { return false; }
00118
00119
00126 virtual bool DoesRootJointLimits() const { return false;}
00133 virtual bool DoesJointLimitsButRoot() const { return false;}
00134
00135
00136 virtual Interface_ID ExpectGoal() const =0;
00137
00138
00144 virtual bool SolveEERotation() const =0;
00145
00146
00165 #pragma warning(push)
00166 #pragma warning(disable:4100)
00167 virtual const IKSys::ZeroPlaneMap* GetZeroPlaneMap(const Point3& a0, const Point3& n0) const { return NULL; }
00168 #pragma warning(pop)
00169
00170 virtual float GetPosThreshold() const =0;
00172 virtual float GetRotThreshold() const =0;
00175 virtual unsigned GetMaxIteration() const =0;
00180 virtual void SetPosThreshold(float) =0;
00185 virtual void SetRotThreshold(float) =0;
00190 virtual void SetMaxIteration(unsigned) =0;
00191
00192
00193
00194
00195
00223 virtual ReturnCondition Solve(IKSys::LinkChain&) =0;
00224 };