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 _CONSTRAINT_H
00025 #define _CONSTRAINT_H
00026
00027 #include "Template.h"
00028
00029
00030 class CSLModel;
00031
00032
00034 class XSIEXPORT CSLConstraint
00035 : public CSLTemplate
00036 {
00037 public:
00041 enum EConstraintType
00042 {
00043 SI_SCALING,
00044 SI_ORIENTATION,
00045 SI_DIRECTION,
00046 SI_POSITION,
00047 SI_INTEREST,
00048 SI_UP_VECTOR,
00049 SI_PREFERED_AXIS,
00050 };
00051
00058 CSLConstraint(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate, EConstraintType in_ConstraintType);
00059
00062 virtual ~CSLConstraint();
00063
00067 CSLModel* GetReference();
00068
00072 EConstraintType GetConstraintType();
00073
00078 SI_Error AddConstrainingObject(CSLModel* in_pConstrainingObject);
00079
00083 SI_Int GetConstrainingObjectCount();
00084
00088 CSLModel** ConstrainingObjects();
00089
00094 SI_Error RemoveConstrainingObject(SI_Int in_nIndex);
00095
00100 SI_Error RemoveConstrainingObject(CSLModel* in_pConstrainingObject);
00101
00105 SI_Error ClearConstrainingObjects();
00106
00110 CSLConstraint* CreateUpVector();
00111
00115 CSLConstraint* UpVector();
00116
00120 SI_Error DestroyUpVector();
00121
00122
00127 CSLConstraint* ConnectUpVector(CSLConstraint* in_pUpVector);
00128
00133 CSLModel* ConnectConstrainingObject(CSLModel* in_pModel);
00134
00139 virtual SI_Error Synchronize();
00140
00144 virtual ETemplateType Type() { return CSLTemplate::SI_CONSTRAINT; }
00145
00146 private:
00147 CSLStrEnumProxy<EConstraintType, SI_PREFERED_AXIS> m_ConstraintType;
00148 CSIBCArray<CSLModel *> m_ConstrainingModels;
00149 CSLConstraint* m_pUpVector;
00150
00151 void *m_pReserved;
00152 };
00153
00154 #endif