00001 #ifndef __GXENTITYMAN 00002 #define __GXENTITYMAN 00003 00004 #include "GXStandardDefines.h" 00005 #include "GXAutoArray.h" 00006 #include "GXCollisionManager.h" 00007 00008 class IGXEntityManager 00009 { 00010 public: 00011 IGXEntityManager(){} 00012 virtual ~IGXEntityManager(){} 00013 00014 virtual int AddEntity(const D3DXVECTOR3* pPos, 00015 const float fBoundingRadius)=0;//returns -1 on error, otherwise returns ID of entity 00016 virtual bool DeleteEntity(const int nID)=0; 00017 virtual void DeleteAllEntities()=0; 00018 00019 virtual bool ChangeEntityBoundingRadius(const int nID, const float fNewRadius)=0; 00020 virtual bool GetEntityBoundingRadius(const int nID, float *pOut)=0; 00021 00022 virtual bool ChangeEntityPosition(const int nID, const D3DXVECTOR3* pNewPos)=0; 00023 virtual bool GetEntityPosition(const int nID, D3DXVECTOR3* pOut)=0; 00024 00025 00026 virtual bool GetEntitiesInSphere(CGXAutoArray<int>* pOut, 00027 const D3DXVECTOR3* pCenter, 00028 const float fRadius)=0; 00029 00030 virtual bool SetCollisionManager(IGXCollsionManager* pCollider)=0; 00031 }; 00032 00033 00034 00035 00036 00037 00038 00039 /*struct SGXEntityWaypoint 00040 { 00041 UINT uTime;//this allows for 50 days of game play. Miliseconds since game start 00042 00043 D3DXVECTOR3 vPos; 00044 D3DXVECTOR3 vScale; 00045 00046 00048 //these 2 can be set higher than 1.0 for multiple iterations on one waypoint (like texture coords of 2.0) 00050 D3DXVECTOR3 vRotate; 00051 float fAnimationPosition; 00052 00053 00054 inline void operator+=(SGXEntityWaypoint &OtherPoint) 00055 { 00056 uTime+=OtherPoint.uTime; 00057 vPos+=OtherPoint.vPos; 00058 vScale+=OtherPoint.vScale; 00059 00060 vRotate+=OtherPoint.vRotate; 00061 fAnimationPosition+=OtherPoint.fAnimationPosition; 00062 } 00063 00064 00065 inline void operator*=(float fVal) 00066 { 00067 uTime*=fVal; 00068 vPos*=fVal; 00069 vScale*=fVal; 00070 00071 vRotate*=fVal; 00072 fAnimationPosition*=fVal; 00073 } 00074 00075 00076 };*///todo, stick this stuff in a CGXAnimationManager or something 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 #endif