HoverRace  2.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
HoverRace::Model::Level Class Reference

#include <Level.h>

+ Inheritance diagram for HoverRace::Model::Level:

Classes

struct  Feature
 
class  FreeElementList
 
struct  Room
 
struct  Section
 
class  SectionShape
 

Public Types

enum  { eNonClassified = -1, eMustBeDeleted = -2 }
 

Public Member Functions

 Level (Track &track, BOOL pAllowRendering=FALSE, char pGameOpts=1)
 
 Level (const Level &)=delete
 
 ~Level ()
 
int FindRoomForPoint (const MR_2DCoordinate &pPosition, int pStartingRoom) const
 
void FlushPermElementPosCache ()
 
int GetFeature (int pRoomId, int pChildIndex) const
 
SurfaceElementGetFeatureBottomElement (int pFeatureId) const
 
MR_Int32 GetFeatureBottomLevel (int pFeatureId) const
 
BOOL GetFeatureContact (int pFeature, const ShapeInterface *pShape, ContactSpec &pAnswer)
 
BOOL GetFeatureContactOrientation (int pFeature, const ShapeInterface *pShape, MR_Angle &pAnswer)
 
int GetFeatureCount (int pRoomId) const
 
PolygonShapeGetFeatureShape (int pFeatureId) const
 
SurfaceElementGetFeatureTopElement (int pFeatureId) const
 
MR_Int32 GetFeatureTopLevel (int pFeatureId) const
 
const MR_2DCoordinateGetFeatureVertex (int pFeatureId, int pVertex) const
 
int GetFeatureVertexCount (int pFeatureId) const
 
SurfaceElementGetFeatureWallElement (int pFeatureId, size_t pVertex) const
 
MR_Int32 GetFeatureWallLen (int pFeatureId, int pVertex) const
 
MR_FreeElementHandle GetFirstFreeElement (int pRoom) const
 
int GetNbVisibleSurface (int pRoomId) const
 
int GetNeighbor (int pRoomId, int pVertex) const
 
int GetParent (int pFeatureId) const
 
MR_FreeElementHandle GetPermanentElementHandle (int pElem) const
 
int GetPlayerCount () const
 
int GetPlayerTeam (int pPlayerId) const
 
SurfaceElementGetRoomBottomElement (int pRoomId) const
 
MR_Int32 GetRoomBottomLevel (int pRoomId) const
 
void GetRoomContact (int pRoom, const ShapeInterface *pShape, RoomContactSpec &pAnswer)
 
int GetRoomCount () const
 
PolygonShapeGetRoomShape (int pRoomId) const
 
SurfaceElementGetRoomTopElement (int pRoomId) const
 
MR_Int32 GetRoomTopLevel (int pRoomId) const
 
const MR_2DCoordinateGetRoomVertex (int pRoomId, int pVertex) const
 
int GetRoomVertexCount (int pRoomId) const
 
BOOL GetRoomWallContactOrientation (int pRoom, int pWall, const ShapeInterface *pShape, MR_Angle &pAnswer)
 
SurfaceElementGetRoomWallElement (int pRoomId, size_t pVertex) const
 
MR_Int32 GetRoomWallLen (int pRoomId, int pVertex) const
 
MR_Angle GetStartingOrientation (int pPlayerId) const
 
const MR_3DCoordinateGetStartingPos (int pPlayerId) const
 
int GetStartingRoom (int pPlayerId) const
 
const SectionIdGetVisibleCeilingList (int pRoomId) const
 
const SectionIdGetVisibleFloorList (int pRoomId) const
 
const int * GetVisibleZones (int pRoomId, int &pNbVisibleZones) const
 
MR_FreeElementHandle InsertElement (std::shared_ptr< FreeElement > pElement, int pNewRoom, BOOL Broadcast=FALSE)
 
void MoveElement (MR_FreeElementHandle pHandle, int pNewRoom)
 
Leveloperator= (const Level &)=delete
 
void Serialize (Parcel::ObjStream &pArchive)
 
void SetBroadcastHook (void(*pCreationHook)(FreeElement *, int, void *), void(*pStateHook)(FreeElement *, int, int, void *), void *pHookData)
 
void SetPermElementPos (int pPermElement, int pRoom, const MR_3DCoordinate &pNewPos)
 

Static Public Member Functions

static void DeleteElement (MR_FreeElementHandle pHandle)
 
static FreeElementGetFreeElement (MR_FreeElementHandle pHandle)
 
static MR_FreeElementHandle GetNextFreeElement (MR_FreeElementHandle pHandle)
 

Protected Member Functions

int GetRealRoomRecursive (const MR_2DCoordinate &pPosition, int pOriginalSection, int=-1) const
 

Protected Attributes

BOOL mAllowRendering
 
void * mBroadcastHookData
 
void(* mElementCreationBroadcastHook )(FreeElement *pElement, int pRoom, void *pHookData)
 
FeaturemFeatureList
 
FreeElementList ** mFreeElementClassifiedByRoomList
 
FreeElementListmFreeElementNonClassifiedList
 
char mGameOpts
 
int mNbFeature
 
int mNbPermNetActor
 
int mNbPlayer
 
int mNbRoom
 
int mPermActorCacheCount
 
int mPermActorIndexCache [MR_NB_PERNET_ACTORS]
 
int mPermActorNewRoomCache [MR_NB_PERNET_ACTORS]
 
void(* mPermElementStateBroadcastHook )(FreeElement *pElement, int pRoom, int pPermId, void *pHookData)
 
FreeElementListmPermNetActor [MR_NB_PERNET_ACTORS]
 
int mPlayerTeam [MR_NB_MAX_PLAYER]
 
RoommRoomList
 
MR_Angle mStartingOrientation [MR_NB_MAX_PLAYER]
 
MR_3DCoordinate mStartingPosition [MR_NB_MAX_PLAYER]
 
int mStartingRoom [MR_NB_MAX_PLAYER]
 

Private Attributes

Tracktrack
 

Member Enumeration Documentation

anonymous enum
Enumerator
eNonClassified 
eMustBeDeleted 

Constructor & Destructor Documentation

HoverRace::Model::Level::Level ( Track track,
BOOL  pAllowRendering = FALSE,
char  pGameOpts = 1 
)
HoverRace::Model::Level::Level ( const Level )
delete
HoverRace::Model::Level::~Level ( )

Member Function Documentation

void HoverRace::Model::Level::DeleteElement ( MR_FreeElementHandle  pHandle)
static
int HoverRace::Model::Level::FindRoomForPoint ( const MR_2DCoordinate pPosition,
int  pStartingRoom 
) const
void HoverRace::Model::Level::FlushPermElementPosCache ( )
int HoverRace::Model::Level::GetFeature ( int  pRoomId,
int  pChildIndex 
) const
SurfaceElement * HoverRace::Model::Level::GetFeatureBottomElement ( int  pFeatureId) const
MR_Int32 HoverRace::Model::Level::GetFeatureBottomLevel ( int  pFeatureId) const
BOOL HoverRace::Model::Level::GetFeatureContact ( int  pFeature,
const ShapeInterface pShape,
ContactSpec pAnswer 
)
BOOL HoverRace::Model::Level::GetFeatureContactOrientation ( int  pFeature,
const ShapeInterface pShape,
MR_Angle pAnswer 
)
int HoverRace::Model::Level::GetFeatureCount ( int  pRoomId) const
PolygonShape * HoverRace::Model::Level::GetFeatureShape ( int  pFeatureId) const
SurfaceElement * HoverRace::Model::Level::GetFeatureTopElement ( int  pFeatureId) const
MR_Int32 HoverRace::Model::Level::GetFeatureTopLevel ( int  pFeatureId) const
const MR_2DCoordinate & HoverRace::Model::Level::GetFeatureVertex ( int  pFeatureId,
int  pVertex 
) const
int HoverRace::Model::Level::GetFeatureVertexCount ( int  pFeatureId) const
SurfaceElement * HoverRace::Model::Level::GetFeatureWallElement ( int  pFeatureId,
size_t  pVertex 
) const
MR_Int32 HoverRace::Model::Level::GetFeatureWallLen ( int  pFeatureId,
int  pVertex 
) const
MR_FreeElementHandle HoverRace::Model::Level::GetFirstFreeElement ( int  pRoom) const
FreeElement * HoverRace::Model::Level::GetFreeElement ( MR_FreeElementHandle  pHandle)
static
int HoverRace::Model::Level::GetNbVisibleSurface ( int  pRoomId) const
int HoverRace::Model::Level::GetNeighbor ( int  pRoomId,
int  pVertex 
) const
MR_FreeElementHandle HoverRace::Model::Level::GetNextFreeElement ( MR_FreeElementHandle  pHandle)
static
int HoverRace::Model::Level::GetParent ( int  pFeatureId) const
MR_FreeElementHandle HoverRace::Model::Level::GetPermanentElementHandle ( int  pElem) const
int HoverRace::Model::Level::GetPlayerCount ( ) const
int HoverRace::Model::Level::GetPlayerTeam ( int  pPlayerId) const
int HoverRace::Model::Level::GetRealRoomRecursive ( const MR_2DCoordinate pPosition,
int  pOriginalSection,
int  = -1 
) const
protected
SurfaceElement * HoverRace::Model::Level::GetRoomBottomElement ( int  pRoomId) const
MR_Int32 HoverRace::Model::Level::GetRoomBottomLevel ( int  pRoomId) const
void HoverRace::Model::Level::GetRoomContact ( int  pRoom,
const ShapeInterface pShape,
RoomContactSpec pAnswer 
)
int HoverRace::Model::Level::GetRoomCount ( ) const
PolygonShape * HoverRace::Model::Level::GetRoomShape ( int  pRoomId) const
SurfaceElement * HoverRace::Model::Level::GetRoomTopElement ( int  pRoomId) const
MR_Int32 HoverRace::Model::Level::GetRoomTopLevel ( int  pRoomId) const
const MR_2DCoordinate & HoverRace::Model::Level::GetRoomVertex ( int  pRoomId,
int  pVertex 
) const
int HoverRace::Model::Level::GetRoomVertexCount ( int  pRoomId) const
BOOL HoverRace::Model::Level::GetRoomWallContactOrientation ( int  pRoom,
int  pWall,
const ShapeInterface pShape,
MR_Angle pAnswer 
)
SurfaceElement * HoverRace::Model::Level::GetRoomWallElement ( int  pRoomId,
size_t  pVertex 
) const
MR_Int32 HoverRace::Model::Level::GetRoomWallLen ( int  pRoomId,
int  pVertex 
) const
MR_Angle HoverRace::Model::Level::GetStartingOrientation ( int  pPlayerId) const
const MR_3DCoordinate & HoverRace::Model::Level::GetStartingPos ( int  pPlayerId) const
int HoverRace::Model::Level::GetStartingRoom ( int  pPlayerId) const
const SectionId * HoverRace::Model::Level::GetVisibleCeilingList ( int  pRoomId) const
const SectionId * HoverRace::Model::Level::GetVisibleFloorList ( int  pRoomId) const
const int * HoverRace::Model::Level::GetVisibleZones ( int  pRoomId,
int &  pNbVisibleZones 
) const
MR_FreeElementHandle HoverRace::Model::Level::InsertElement ( std::shared_ptr< FreeElement pElement,
int  pNewRoom,
BOOL  Broadcast = FALSE 
)
void HoverRace::Model::Level::MoveElement ( MR_FreeElementHandle  pHandle,
int  pNewRoom 
)
Level& HoverRace::Model::Level::operator= ( const Level )
delete
void HoverRace::Model::Level::Serialize ( Parcel::ObjStream pArchive)
void HoverRace::Model::Level::SetBroadcastHook ( void(*)(FreeElement *, int, void *)  pCreationHook,
void(*)(FreeElement *, int, int, void *)  pStateHook,
void *  pHookData 
)
void HoverRace::Model::Level::SetPermElementPos ( int  pPermElement,
int  pRoom,
const MR_3DCoordinate pNewPos 
)

Member Data Documentation

BOOL HoverRace::Model::Level::mAllowRendering
protected
void* HoverRace::Model::Level::mBroadcastHookData
protected
void(* HoverRace::Model::Level::mElementCreationBroadcastHook) (FreeElement *pElement, int pRoom, void *pHookData)
protected
Feature* HoverRace::Model::Level::mFeatureList
protected
FreeElementList** HoverRace::Model::Level::mFreeElementClassifiedByRoomList
protected
FreeElementList* HoverRace::Model::Level::mFreeElementNonClassifiedList
protected
char HoverRace::Model::Level::mGameOpts
protected
int HoverRace::Model::Level::mNbFeature
protected
int HoverRace::Model::Level::mNbPermNetActor
protected
int HoverRace::Model::Level::mNbPlayer
protected
int HoverRace::Model::Level::mNbRoom
protected
int HoverRace::Model::Level::mPermActorCacheCount
protected
int HoverRace::Model::Level::mPermActorIndexCache[MR_NB_PERNET_ACTORS]
protected
int HoverRace::Model::Level::mPermActorNewRoomCache[MR_NB_PERNET_ACTORS]
protected
void(* HoverRace::Model::Level::mPermElementStateBroadcastHook) (FreeElement *pElement, int pRoom, int pPermId, void *pHookData)
protected
FreeElementList* HoverRace::Model::Level::mPermNetActor[MR_NB_PERNET_ACTORS]
protected
int HoverRace::Model::Level::mPlayerTeam[MR_NB_MAX_PLAYER]
protected
Room* HoverRace::Model::Level::mRoomList
protected
MR_Angle HoverRace::Model::Level::mStartingOrientation[MR_NB_MAX_PLAYER]
protected
MR_3DCoordinate HoverRace::Model::Level::mStartingPosition[MR_NB_MAX_PLAYER]
protected
int HoverRace::Model::Level::mStartingRoom[MR_NB_MAX_PLAYER]
protected
Track& HoverRace::Model::Level::track
private

The documentation for this class was generated from the following files: