00001
00002
00012
00013
00014 #ifndef _IKJOINT_H
00015 #define _IKJOINT_H
00016
00017 #include "IK.h"
00018
00019
00025 class XSIEXPORT CSLIKResolutionPlane
00026 : public CSLTemplate
00027 {
00028 public:
00031 enum EIKResPlaneType
00032 {
00033 SI_IKRPTYPE_DEFAULT,
00034 SI_IKRPTYPE_PREFAXIS,
00035 SI_IKRPTYPE_UPVECTOR,
00036 };
00037
00044 CSLIKResolutionPlane(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
00045
00048 virtual ~CSLIKResolutionPlane();
00049
00053 EIKResPlaneType GetResolutionPlaneType();
00054
00058 SI_Void SetResolutionPlaneType(EIKResPlaneType in_Type);
00059
00063 SI_Float GetRoll();
00064
00068 SI_Void SetRoll(SI_Float in_fValue);
00069
00073 SI_Bool GetPrefRotXAsRoll();
00074
00078 SI_Void SetPrefRotXAsRoll(SI_Bool in_bValue);
00079
00083 CSIBCVector3D GetUpVector();
00084
00088 SI_Void SetUpVector(CSIBCVector3D &in_rValue);
00089
00093 SI_Bool GetUpVectorRelativeToRoot();
00094
00098 SI_Void SetUpVectorRelativeToRoot(SI_Bool in_bValue);
00099
00100
00104 CSIBCVector3D GetPreferredRotation();
00105
00109 SI_Void SetPreferredRotation(CSIBCVector3D &in_rValue);
00110
00114 SI_Bool GetPreferredRotationRelativeToRoot();
00115
00119 SI_Void SetPreferredRotationRelativeToRoot(SI_Bool in_bValue);
00120
00124 virtual SI_Error Synchronize();
00125
00129 virtual ETemplateType Type();
00130
00135 virtual CSLAnimatableType* ParameterFromName(SI_Char *in_szName);
00136
00141 virtual SI_Bool ValidateParent(CSLModel *in_pNewParent);
00142
00143 CSLIntProxy* GetTypeProxy() { return &m_Type; };
00144 CSLFloatProxy* GetRollProxy() { return & m_Roll; };
00145 CSLBoolProxy* GetPrefRotXAsRollProxy() { return & m_PrefRotXAsRoll; };
00146 CSLVector3DProxy* GetUpVectorProxy() { return & m_UpVector; };
00147 CSLBoolProxy* GetUpVectorRelativeToRootProxy() { return & m_UpVectorRelativeToRoot; };
00148 CSLVector3DProxy* GetPreferredRotationProxy() { return & m_PreferredRotation; };
00149 CSLBoolProxy* GetPrefRotRelativeToRootProxy() { return & m_PrefRotRelativeToRoot; };
00150
00151 private:
00152
00153 CSLIntProxy m_Type;
00154 CSLFloatProxy m_Roll;
00155 CSLBoolProxy m_PrefRotXAsRoll;
00156 CSLVector3DProxy m_UpVector;
00157 CSLBoolProxy m_UpVectorRelativeToRoot;
00158 CSLVector3DProxy m_PreferredRotation;
00159 CSLBoolProxy m_PrefRotRelativeToRoot;
00160
00161 void *m_pReserved;
00162 };
00163
00164
00170 class XSIEXPORT CSLIKJoint
00171 : public CSLIK
00172 {
00173 public:
00175 enum EJointSolverType
00176 {
00177 SI_DEFAULT,
00178 SI_2D,
00179 SI_3D,
00180 };
00181
00189 CSLIKJoint(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate, CSLModel* in_pRoot);
00190
00193 virtual ~CSLIKJoint();
00194
00198 SI_Float GetLength();
00199
00203 SI_Void SetLength(SI_Float in_fValue);
00204
00208 CSIBCVector3D GetPreferredRotation();
00209
00213 SI_Void SetPreferredRotation(CSIBCVector3D &in_rValue);
00214
00218 SI_Bool GetPseudoRoot();
00219
00223 SI_Void SetPseudoRoot(SI_Bool in_bValue);
00224
00228 SI_Bool GetRotationLimitActivation();
00229
00233 SI_Void SetRotationLimitActivation(SI_Bool in_bValue);
00234
00238 CSIBCVector3D GetRotationLimitMaximum();
00239
00243 SI_Void SetRotationLimitMaximum(CSIBCVector3D &in_rValue);
00244
00248 CSIBCVector3D GetRotationLimitMinimum();
00249
00253 SI_Void SetRotationLimitMinimum(CSIBCVector3D &in_rValue);
00254
00258 EJointSolverType GetSolverType();
00259
00263 SI_Void SetSolverType(EJointSolverType in_Type);
00264
00268 SI_Float GetStiffness();
00269
00273 SI_Void SetStiffness(SI_Float in_fValue);
00274
00278 SI_Bool GetStiffnessActivation();
00279
00283 SI_Void SetStiffnessActivation(SI_Bool in_bValue);
00284
00288 CSLIKResolutionPlane* GetResolutionPlane();
00289
00293 CSLIKResolutionPlane* CreateResolutionPlane();
00294
00298 SI_Void ConnectResolutionPlane(CSLIKResolutionPlane *in_pResPlane);
00299
00303 virtual SI_Error Synchronize();
00304
00308 virtual ETemplateType Type();
00309
00314 virtual CSLAnimatableType* ParameterFromName(SI_Char *in_szName);
00315
00320 virtual SI_Bool ValidateParent(CSLModel *in_pNewParent);
00321
00322 CSLVector3DProxy* GetPreferredRotationProxy(){ return &m_PreferredRotation;};
00323 CSLBoolProxy* GetLimitActivationProxy(){ return &m_RotationLimitActivation;};
00324 CSLVector3DProxy* GetRotationLimitMinimumProxy(){ return &m_RotationLimitMinimum;};
00325 CSLVector3DProxy* GetRotationLimitMaximumProxy(){ return &m_RotationLimitMaximum;};
00326 CSLBoolProxy* GetPseudoRootProxy(){ return &m_PseudoRoot;};
00327 CSLBoolProxy* GetStiffnessActivationProxy(){ return &m_StiffnessActivation;};
00328 CSLFloatProxy* GetStiffnessProxy(){ return &m_Stiffness;};
00329 CSLFloatProxy* GetLengthProxy(){ return &m_Length;};
00330
00331 private:
00332 CSLStrEnumProxy<EJointSolverType, SI_3D> m_SolverType;
00333 CSLVector3DProxy m_PreferredRotation;
00334 CSLBoolProxy m_RotationLimitActivation;
00335 CSLVector3DProxy m_RotationLimitMinimum;
00336 CSLVector3DProxy m_RotationLimitMaximum;
00337 CSLBoolProxy m_PseudoRoot;
00338 CSLBoolProxy m_StiffnessActivation;
00339 CSLFloatProxy m_Stiffness;
00340 CSLFloatProxy m_Length;
00341
00342 CSLIKResolutionPlane *m_pResolutionPlane;
00343
00344 void *m_pReserved;
00345 };
00346
00347 #endif