00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _IKJOINT_H
00025 #define _IKJOINT_H
00026
00027 #include "IK.h"
00028
00029
00031 class XSIEXPORT CSLIKResolutionPlane
00032 : public CSLTemplate
00033 {
00034 public:
00036 enum EIKResPlaneType
00037 {
00038 SI_IKRPTYPE_DEFAULT,
00039 SI_IKRPTYPE_PREFAXIS,
00040 SI_IKRPTYPE_UPVECTOR,
00041 };
00042
00049 CSLIKResolutionPlane(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
00050
00053 virtual ~CSLIKResolutionPlane();
00054
00058 EIKResPlaneType GetResolutionPlaneType();
00059
00064 SI_Void SetResolutionPlaneType(EIKResPlaneType in_Type);
00065
00069 SI_Float GetRoll();
00070
00075 SI_Void SetRoll(SI_Float in_fValue);
00076
00080 SI_Bool GetPrefRotXAsRoll();
00081
00086 SI_Void SetPrefRotXAsRoll(SI_Bool in_bValue);
00087
00091 CSIBCVector3D GetUpVector();
00092
00097 SI_Void SetUpVector(CSIBCVector3D &in_rValue);
00098
00102 SI_Bool GetUpVectorRelativeToRoot();
00103
00108 SI_Void SetUpVectorRelativeToRoot(SI_Bool in_bValue);
00109
00110
00114 CSIBCVector3D GetPreferredRotation();
00115
00120 SI_Void SetPreferredRotation(CSIBCVector3D &in_rValue);
00121
00125 SI_Bool GetPreferredRotationRelativeToRoot();
00126
00131 SI_Void SetPreferredRotationRelativeToRoot(SI_Bool in_bValue);
00132
00137 virtual SI_Error Synchronize();
00138
00142 virtual ETemplateType Type();
00143
00148 virtual CSLAnimatableType* ParameterFromName(SI_Char *in_szName);
00149
00154 virtual SI_Bool ValidateParent(CSLModel *in_pNewParent);
00155
00156 CSLIntProxy* GetTypeProxy() { return &m_Type; };
00157 CSLFloatProxy* GetRollProxy() { return & m_Roll; };
00158 CSLBoolProxy* GetPrefRotXAsRollProxy() { return & m_PrefRotXAsRoll; };
00159 CSLVector3DProxy* GetUpVectorProxy() { return & m_UpVector; };
00160 CSLBoolProxy* GetUpVectorRelativeToRootProxy() { return & m_UpVectorRelativeToRoot; };
00161 CSLVector3DProxy* GetPreferredRotationProxy() { return & m_PreferredRotation; };
00162 CSLBoolProxy* GetPrefRotRelativeToRootProxy() { return & m_PrefRotRelativeToRoot; };
00163
00164 private:
00165
00166 CSLIntProxy m_Type;
00167 CSLFloatProxy m_Roll;
00168 CSLBoolProxy m_PrefRotXAsRoll;
00169 CSLVector3DProxy m_UpVector;
00170 CSLBoolProxy m_UpVectorRelativeToRoot;
00171 CSLVector3DProxy m_PreferredRotation;
00172 CSLBoolProxy m_PrefRotRelativeToRoot;
00173
00174 void *m_pReserved;
00175 };
00176
00177
00179 class XSIEXPORT CSLIKJoint
00180 : public CSLIK
00181 {
00182 public:
00184 enum EJointSolverType
00185 {
00186 SI_DEFAULT,
00187 SI_2D,
00188 SI_3D,
00189 };
00190
00198 CSLIKJoint(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate, CSLModel* in_pRoot);
00199
00202 virtual ~CSLIKJoint();
00203
00207 SI_Float GetLength();
00208
00213 SI_Void SetLength(SI_Float in_fValue);
00214
00218 CSIBCVector3D GetPreferredRotation();
00219
00224 SI_Void SetPreferredRotation(CSIBCVector3D &in_rValue);
00225
00229 SI_Bool GetPseudoRoot();
00230
00235 SI_Void SetPseudoRoot(SI_Bool in_bValue);
00236
00240 SI_Bool GetRotationLimitActivation();
00241
00246 SI_Void SetRotationLimitActivation(SI_Bool in_bValue);
00247
00251 CSIBCVector3D GetRotationLimitMaximum();
00252
00257 SI_Void SetRotationLimitMaximum(CSIBCVector3D &in_rValue);
00258
00262 CSIBCVector3D GetRotationLimitMinimum();
00263
00268 SI_Void SetRotationLimitMinimum(CSIBCVector3D &in_rValue);
00269
00273 EJointSolverType GetSolverType();
00274
00279 SI_Void SetSolverType(EJointSolverType in_Type);
00280
00284 SI_Float GetStiffness();
00285
00290 SI_Void SetStiffness(SI_Float in_fValue);
00291
00295 SI_Bool GetStiffnessActivation();
00296
00301 SI_Void SetStiffnessActivation(SI_Bool in_bValue);
00302
00306 CSLIKResolutionPlane* GetResolutionPlane();
00307
00311 CSLIKResolutionPlane* CreateResolutionPlane();
00312
00317 SI_Void ConnectResolutionPlane(CSLIKResolutionPlane *in_pResPlane);
00318
00323 virtual SI_Error Synchronize();
00324
00328 virtual ETemplateType Type();
00329
00334 virtual CSLAnimatableType* ParameterFromName(SI_Char *in_szName);
00335
00340 virtual SI_Bool ValidateParent(CSLModel *in_pNewParent);
00341
00342 CSLVector3DProxy* GetPreferredRotationProxy(){ return &m_PreferredRotation;};
00343 CSLBoolProxy* GetLimitActivationProxy(){ return &m_RotationLimitActivation;};
00344 CSLVector3DProxy* GetRotationLimitMinimumProxy(){ return &m_RotationLimitMinimum;};
00345 CSLVector3DProxy* GetRotationLimitMaximumProxy(){ return &m_RotationLimitMaximum;};
00346 CSLBoolProxy* GetPseudoRootProxy(){ return &m_PseudoRoot;};
00347 CSLBoolProxy* GetStiffnessActivationProxy(){ return &m_StiffnessActivation;};
00348 CSLFloatProxy* GetStiffnessProxy(){ return &m_Stiffness;};
00349 CSLFloatProxy* GetLengthProxy(){ return &m_Length;};
00350
00351 private:
00352 CSLStrEnumProxy<EJointSolverType, SI_3D> m_SolverType;
00353 CSLVector3DProxy m_PreferredRotation;
00354 CSLBoolProxy m_RotationLimitActivation;
00355 CSLVector3DProxy m_RotationLimitMinimum;
00356 CSLVector3DProxy m_RotationLimitMaximum;
00357 CSLBoolProxy m_PseudoRoot;
00358 CSLBoolProxy m_StiffnessActivation;
00359 CSLFloatProxy m_Stiffness;
00360 CSLFloatProxy m_Length;
00361
00362 CSLIKResolutionPlane *m_pResolutionPlane;
00363
00364 void *m_pReserved;
00365 };
00366
00367 #endif