00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00020 #pragma once
00021
00022 #include "..\maxheap.h"
00023 #include "..\istdplug.h"
00024 #include "IGameProperty.h"
00025 #include "IConversionManager.h"
00026
00027 class IGameNode;
00028
00029
00031
00033 enum IGameControlType{
00034 IGAME_POS,
00035 IGAME_ROT,
00036 IGAME_SCALE,
00037 IGAME_FLOAT,
00038 IGAME_POINT3,
00039 IGAME_TM,
00041 IGAME_EULER_X,
00042 IGAME_EULER_Y,
00043 IGAME_EULER_Z,
00045 IGAME_POINT4,
00047 IGAME_POS_X,
00048 IGAME_POS_Y,
00049 IGAME_POS_Z,
00050 };
00051
00052
00053
00054
00055 class IGameConstraint;
00056 class GMatrix;
00057
00059
00061 class IGameTCBKey: public MaxHeapOperators {
00062 public:
00064
00066 float tens, cont, bias, easeIn, easeOut;
00068
00070 float fval;
00072
00074 Point3 pval;
00076
00078 Point4 p4val;
00080
00082 AngAxis aval;
00084
00086 ScaleValue sval;
00087 };
00088
00090
00092 class IGameBezierKey: public MaxHeapOperators {
00093 public:
00095
00097 float fintan, fouttan;
00098
00100
00102 float fval;
00104
00106 float finLength, foutLength;
00107
00109
00111 Point3 pintan, pouttan;
00112
00114
00116 Point3 pval;
00118
00120 Point3 pinLength, poutLength;
00122
00124 Quat qval;
00126
00128 ScaleValue sval;
00129
00131
00133 Point4 p4intan, p4outtan;
00134
00136
00138 Point4 p4inLength, p4outLength;
00139
00141
00143 Point4 p4val;
00144
00145 };
00146
00148
00150 class IGameLinearKey: public MaxHeapOperators {
00151 public:
00153
00155 float fval;
00157
00159 Point3 pval;
00161
00163 Quat qval;
00165
00167 ScaleValue sval;
00168 };
00169
00170
00172
00175 class IGameSampleKey: public MaxHeapOperators {
00176 public:
00178
00180 Point3 pval;
00182
00184 Point4 p4val;
00186
00188 float fval;
00190
00192 Quat qval;
00194
00196 ScaleValue sval;
00198
00200 GMatrix gval;
00201
00202 };
00203
00204
00206
00208 class IGameKey: public MaxHeapOperators
00209 {
00210 public:
00212 TimeValue t;
00214 DWORD flags;
00216
00218 IGameTCBKey tcbKey;
00220
00222 IGameBezierKey bezierKey;
00224
00226 IGameLinearKey linearKey;
00227
00229
00231 IGameSampleKey sampleKey;
00232 };
00233
00237 typedef Tab<IGameKey> IGameKeyTab;
00238
00239
00240
00242
00257 class IGameControl: public MaxHeapOperators
00258 {
00259 public:
00261 enum MaxControlType{
00262 IGAME_UNKNOWN,
00263 IGAME_MAXSTD,
00264 IGAME_BIPED,
00265 IGAME_EULER,
00266 IGAME_ROT_CONSTRAINT,
00267 IGAME_POS_CONSTRAINT,
00268 IGAME_LINK_CONSTRAINT,
00269 IGAME_LIST,
00270 IGAME_INDEPENDENT_POS,
00271 IGAME_MASTER,
00273 };
00274
00276
00278 enum EulerOrder{
00279 XYZ,
00280 XZY,
00281 YZX,
00282 YXZ,
00283 ZXY,
00284 ZYX,
00285 XYX,
00286 YZY,
00287 ZXZ,
00288 BAD
00289 };
00290
00292 virtual ~IGameControl() {;}
00293
00295
00309 virtual bool GetBezierKeys(IGameKeyTab &gameKeyTab,IGameControlType Type)=0;
00310
00312
00317 virtual bool GetLinearKeys(IGameKeyTab &gameKeyTab, IGameControlType Type)=0;
00318
00320
00325 virtual bool GetTCBKeys(IGameKeyTab &gameKeyTab, IGameControlType Type)=0;
00326
00328
00342 virtual bool GetFullSampledKeys(IGameKeyTab &sample, int frameRate, IGameControlType Type, bool Relative = true) =0;
00343
00345
00354 virtual bool GetQuickSampledKeys(IGameKeyTab &sample, IGameControlType Type) =0;
00355
00356
00358
00364 virtual bool GetBezierIGameKey(IGameControlType Type, IGameKey &bezKey, int index) =0 ;
00365
00367
00373 virtual bool GetTCBIGameKey(IGameControlType Type, IGameKey &tcbKey, int index)=0 ;
00374
00376
00382 virtual bool GetLinearIGameKey(IGameControlType Type, IGameKey &linearKey, int index)=0;
00383
00385
00389 virtual int GetIGameKeyCount(IGameControlType Type)=0;
00390
00392
00405 virtual MaxControlType GetControlType(IGameControlType Type)=0;
00406
00408
00412 virtual void GetClassName (IGameControlType Type, MSTR &className)=0;
00413
00415
00419 virtual bool IsAnimated(IGameControlType Type)=0;
00420
00422
00426 virtual bool IsLeaf(IGameControlType Type)=0;
00427
00429
00436 virtual IGameConstraint * GetConstraint(IGameControlType Type)=0;
00437
00439
00446 virtual EulerOrder GetEulerOrder()=0;
00447
00449
00453 virtual Control * GetMaxControl(IGameControlType Type)=0;
00454
00456
00461 virtual IGameControl * GetListSubControl(int index, IGameControlType Type)=0;
00462
00464
00468 virtual int GetNumOfListSubControls(IGameControlType Type)=0;
00469
00470
00472
00476 virtual int GetNumOfVertControls()=0;
00477
00479
00483 virtual IGameControl * GetVertexControl(int index)=0;
00484
00485 };
00486
00488
00492 class IGameConstraint : public IExportEntity
00493 {
00494
00495
00496 public:
00498
00500 enum ConstraintType{
00501 IGAME_PATH,
00502 IGAME_ORIENTATION,
00503 IGAME_LOOKAT,
00504 IGAME_POSITION,
00505 IGAME_LINK,
00506 IGAME_UNKNOWN,
00507 };
00508
00510
00513 virtual int NumberOfConstraintNodes()=0;
00514
00516
00520 virtual IGameNode * GetConstraintNodes(int index)=0;
00521
00523
00528 virtual float GetConstraintWeight(int nodeIndex)=0;
00529
00531
00535 virtual int GetLinkConstBeginFrame(int index) = 0;
00536
00538
00541 virtual ConstraintType GetConstraintType()=0;
00542
00543
00544 };
00545