2 #include "util/ParaMemPool.h" 3 #include "unordered_ref_array.h" 4 #include "IGameObject.h" 5 #include "AttributeModelProxy.h" 17 typedef FixedSizedAllocator<IGameObject::WeakPtr_type> DL_Allocator_IGameWeakPtr;
18 typedef std::list<IGameObject::WeakPtr_type, DL_Allocator_IGameWeakPtr> VisitorList_type;
37 virtual void Cleanup();
39 #define MAX_NUM_SUBTILE 4 62 float GetSphereCollisionDepth(
Vector3* pvCenter, FLOAT radius,
bool bSolveDepth =
false);
bool RemoveVisitor(IGameObject *pObj)
delete a visitor to the terrain tile.
Definition: TerrainTile.cpp:68
Definition: combase.h:159
float m_fX
the central position of the terrain.
Definition: TerrainTile.h:54
CTerrainTile()
2009.8.26: if defined, we will attach mesh object to the most suitable terrain tile if not defined...
Definition: TerrainTile.cpp:30
CBaseObject * GetLocalObject(const Vector3 &vPos, float fEpsilon=0.01f)
get the first local object,whose position is very close to vPos.
Definition: TerrainTile.cpp:389
void AddVisitor(IGameObject *pObj, bool bCheckDuplicate=false)
add a new visitor to the terrain tile.
Definition: TerrainTile.cpp:49
void GetPosition(Vector3 *pV)
get object position in the world space
Definition: TerrainTile.cpp:152
different physics engine has different winding order.
Definition: EventBinding.h:32
int GetSubTileIndexByPoint(FLOAT fAbsoluteX, FLOAT fAbsoluteY)
desc: get the sub tile index which best tells the position of point given sub tile and its locations...
Definition: TerrainTile.cpp:230
CTerrainTile * CreateSubTile(int nIndex)
nIndex: which tile to get. If the tile is blank, we will create it.
Definition: TerrainTile.cpp:307
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
bool TestCollisionObject(CBaseObject *pObj)
desc: test if the object collide with this object in the world view.
Definition: TerrainTile.cpp:213
bool TestCollisionSphere(const Vector3 *pvCenter, FLOAT radius)
Definition: TerrainTile.cpp:159
virtual IAttributeFields * GetChildAttributeObject(const std::string &sName)
get attribute by child object.
Definition: TerrainTile.cpp:428
CBaseObject * SearchObject(const char *pSearchString, int search_mode=0, int reserved=0)
find a object by its name.
Definition: TerrainTile.cpp:128
CBaseObject * GetObject(const string &sName)
get the object by its name.
Definition: TerrainTile.cpp:120
VisitorList_type m_listVisitors
mobile game objects that is moving in this region
Definition: TerrainTile.h:48
this is an interface class for game objects, such as NPC, OPC and players.
Definition: IGameObject.h:15
float m_fRadius
the radius of the entire terrain (half the length of the square terrain).
Definition: TerrainTile.h:56
a tile in the latticed terrain class
Definition: TerrainTile.h:21
map< string, CBaseObject * > m_namemap
global name mapping.
Definition: TerrainTile.h:50
A common interface for all classes implementing IAttributeFields By implementing this class's virtual...
Definition: IAttributeFields.h:59
virtual int GetChildAttributeColumnCount()
we support multi-dimensional child object.
Definition: TerrainTile.cpp:467
int GetChildTileIndexByRect(FLOAT fAbsoluteX, FLOAT fAbsoluteY, FLOAT fWidth, FLOAT fHeight)
return the indice of child tiles which contain or intersect with a rectangular.
Definition: TerrainTile.cpp:247
virtual int GetChildAttributeObjectCount(int nColumnIndex=0)
get the number of child objects (row count) in the given column.
Definition: TerrainTile.cpp:456
Defines the base class of all scene elements:CBaseObject for Parallel World Engine.
Definition: BaseObject.h:230
float GetObjectCollisionDepth(CBaseObject *pObj)
desc: test if the circle in the y=0 plane collide with this object in the world view Note: radius can...
Definition: TerrainTile.cpp:200
void DestroyObjectByName(const char *sName)
destroy an object by its name.
Definition: TerrainTile.cpp:104
ObjectRefArray_type m_listSolidObj
solid objects list. Mobile objects might collide with this kind of objects
Definition: TerrainTile.h:43
ObjectRefArray_type m_listFreespace
Free space objects list, might contains a rendering hierarchy.
Definition: TerrainTile.h:46