IGameModifier.h

Go to the documentation of this file.
00001 /**********************************************************************
00002  *<
00003     FILE: IGameModifier.h
00004 
00005     DESCRIPTION: Modifier interfaces for IGame
00006 
00007     CREATED BY: Neil Hazzard, Discreet
00008 
00009     HISTORY: created 02/02/02
00010 
00011     IGame Version: 1.122
00012 
00013  *> Copyright (c) 2002, All Rights Reserved.
00014  **********************************************************************/
00021 #pragma once
00022 
00023 #include "IGameProperty.h"
00024 #include "IConversionManager.h"
00025 #include "IGameObject.h"
00026 // forward declarations
00027 class IGameProperty;
00028 class IGameNode;
00029 class Modifier;
00030 class INode;
00031 
00033 
00037 class IGameModifier : public IExportEntity
00038 {
00039 private:
00040     Modifier * gameMod;
00041     INode * gameNode;
00042     MSTR intName;
00043 public:
00044 
00046 
00048     enum ModType{
00049         IGAME_SKINNING, 
00050         IGAME_MORPHER,  
00051         IGAME_GENERAL,  
00052     };
00053 
00055 
00059     IGameModifier(Modifier * mod, INode * node);
00060 
00061 
00063 
00066     virtual ModType GetModifierType() =0;
00067     
00069 
00072     virtual MCHAR * GetUIName() ;
00073 
00075 
00078     virtual MCHAR * GetInternalName() ;
00079 
00081 
00084     virtual Modifier * GetMaxModifier();
00085 
00087 
00091     virtual void EffectedNodes(Tab<INode*> &nodeList);
00092 
00094 
00097     virtual bool IsSkin();
00098 
00100 
00103     virtual bool IsMorpher();
00104 
00105     virtual ~IGameModifier();
00106 
00107 };
00108 
00109 
00111 
00121 class IGameSkin : public IGameModifier
00122 {
00123 public:
00124 
00126 
00128     enum SkinType{
00129         IGAME_PHYSIQUE, 
00130         IGAME_SKIN, 
00131     };
00133 
00135     enum VertexType{
00136         IGAME_RIGID,            
00137         IGAME_RIGID_BLENDED,    
00138         IGAME_UNKNOWN           
00139     };
00140 
00141 
00143 
00146     virtual int GetNumOfSkinnedVerts()=0;
00147     
00149 
00153     virtual int GetNumberOfBones(int vertexIndex)= 0;
00154     
00156 
00161     virtual float GetWeight(int vertexIndex,int boneIndex) = 0;
00162 
00164 
00169     virtual INode * GetBone(int vertexIndex,int boneIndex)= 0;
00170     
00172 
00177     virtual IGameNode * GetIGameBone(int vertexIndex,int boneIndex)= 0;
00178 
00180 
00186     virtual int GetBoneID(int vertexIndex, int boneIndex) =0;
00187     
00189 
00196     virtual VertexType GetVertexType(int vertexIndex)=0;
00197     
00199 
00205     virtual SkinType GetSkinType()=0;
00206 
00208 
00213     virtual bool GetInitBoneTM(IGameNode * boneNode, GMatrix &intMat)=0;
00214 
00216 
00221     virtual bool GetInitBoneTM(INode * boneNode, GMatrix &intMat)=0;
00222 
00224 
00227     virtual void GetInitSkinTM(GMatrix & intMat) = 0;
00228 
00230 
00234     virtual int GetTotalBoneCount()=0;
00235 
00237     virtual int GetTotalSkinBoneCount() = 0;
00238 
00240     virtual IGameMesh * GetInitialPose()=0;
00241 
00243     virtual int GetBoneIndex(IGameNode * boneNode, bool usedList = false) =0;
00244 
00246     virtual int GetBoneIndex(INode * boneNode , bool usedList = false)=0;
00247 
00249     virtual IGameNode * GetIGameBone(int index, bool usedList = false)=0;
00250 
00252     virtual INode * GetBone(int index, bool usedList = false) = 0;
00253 
00255 
00259     IGameSkin(Modifier * mod, INode * node):IGameModifier(mod, node){};
00260 
00261 
00262 
00263 };
00264 
00265 
00267 class IGameMorpher : public IGameModifier
00268 {
00269 public:
00271 
00273     enum MorphType{
00274             MORPHER_OBJECT,     
00275             MORPHER_MODIFIER,   
00276     };
00277 
00279 
00284     virtual int GetNumberOfMorphTargets() = 0;
00285 
00287 
00292     virtual IGameNode * GetMorphTarget(int index) = 0;
00293 
00295 
00299     virtual IGameControl * GetMorphWeight(int index)= 0;
00300 
00302 
00308     virtual MorphType GetMorphType() = 0;
00309 
00311 
00315     IGameMorpher(Modifier * mod, INode * node):IGameModifier(mod, node){};
00316 };
00317 
00319 
00321 class IGameGenMod : public IGameModifier
00322 {
00323 public:
00324     
00326 
00330     IGameGenMod(Modifier * mod, INode * node):IGameModifier(mod, node){};
00331 
00332 };
00333 
00334