OpenRaider  0.1.4-dev
Open Source Tomb Raider Game Engine implementation
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
Room Class Reference

#include <Room.h>

Collaboration diagram for Room:
[legend]

Public Member Functions

 Room (glm::vec3 _pos, BoundingBox *_bbox, RoomMesh *_mesh, unsigned int f, int a, int x, int z, int i)
 
void prepare ()
 
void display (glm::mat4 VP)
 
bool isWall (unsigned long sector)
 
long getSector (float x, float z, float *floor, float *ceiling)
 
long getSector (float x, float z)
 
void getHeightAtPosition (float x, float *y, float z)
 
int getAdjoiningRoom (float x, float y, float z, float x2, float y2, float z2)
 
BoundingBoxgetBoundingBox ()
 
RoomMeshgetMesh ()
 
unsigned int getFlags ()
 
int getAlternateRoom ()
 
int getNumXSectors ()
 
int getNumZSectors ()
 
int getIndex ()
 
void addSprite (RoomSprite *s)
 
void addModel (StaticModel *s)
 
void addSector (Sector *s)
 
void addPortal (Portal *p)
 
unsigned long sizePortals ()
 
PortalgetPortal (unsigned long index)
 

Static Public Member Functions

static void setShowBoundingBox (bool s)
 
static bool getShowBoundingBox ()
 
static void setShowRoomModels (bool s)
 
static bool getShowRoomModels ()
 
static void setShowRoomSprites (bool s)
 
static bool getShowRoomSprites ()
 
static void setShowRoomGeometry (bool s)
 
static bool getShowRoomGeometry ()
 

Private Attributes

glm::vec3 pos
 
glm::mat4 model
 
std::unique_ptr< BoundingBoxbbox
 
std::unique_ptr< RoomMeshmesh
 
unsigned int flags
 
int alternateRoom
 
int numXSectors
 
int numZSectors
 
int roomIndex
 
std::vector< std::unique_ptr< RoomSprite > > sprites
 
std::vector< std::unique_ptr< StaticModel > > models
 
std::vector< std::unique_ptr< Portal > > portals
 
std::vector< std::unique_ptr< Sector > > sectors
 

Static Private Attributes

static bool showBoundingBox = false
 
static bool showRoomModels = true
 
static bool showRoomSprites = true
 
static bool showRoomGeometry = true
 

Detailed Description

Definition at line 22 of file Room.h.

Constructor & Destructor Documentation

Room::Room ( glm::vec3  _pos,
BoundingBox _bbox,
RoomMesh _mesh,
unsigned int  f,
int  a,
int  x,
int  z,
int  i 
)

Definition at line 20 of file Room.cpp.

Member Function Documentation

void Room::prepare ( )
inline

Definition at line 27 of file Room.h.

void Room::display ( glm::mat4  VP)

Definition at line 26 of file Room.cpp.

bool Room::isWall ( unsigned long  sector)
FIXME:
is (sector > 0) correct??

Definition at line 48 of file Room.cpp.

long Room::getSector ( float  x,
float  z,
float *  floor,
float *  ceiling 
)

Definition at line 55 of file Room.cpp.

long Room::getSector ( float  x,
float  z 
)

Definition at line 69 of file Room.cpp.

void Room::getHeightAtPosition ( float  x,
float *  y,
float  z 
)

Definition at line 79 of file Room.cpp.

int Room::getAdjoiningRoom ( float  x,
float  y,
float  z,
float  x2,
float  y2,
float  z2 
)

Definition at line 85 of file Room.cpp.

BoundingBox& Room::getBoundingBox ( )
inline

Definition at line 37 of file Room.h.

RoomMesh& Room::getMesh ( )
inline

Definition at line 38 of file Room.h.

unsigned int Room::getFlags ( )
inline

Definition at line 40 of file Room.h.

int Room::getAlternateRoom ( )
inline

Definition at line 41 of file Room.h.

int Room::getNumXSectors ( )
inline

Definition at line 42 of file Room.h.

int Room::getNumZSectors ( )
inline

Definition at line 43 of file Room.h.

int Room::getIndex ( )
inline

Definition at line 44 of file Room.h.

void Room::addSprite ( RoomSprite s)
inline

Definition at line 46 of file Room.h.

void Room::addModel ( StaticModel s)
inline

Definition at line 47 of file Room.h.

void Room::addSector ( Sector s)
inline

Definition at line 48 of file Room.h.

void Room::addPortal ( Portal p)
inline

Definition at line 50 of file Room.h.

unsigned long Room::sizePortals ( )
inline

Definition at line 51 of file Room.h.

Portal& Room::getPortal ( unsigned long  index)
inline

Definition at line 52 of file Room.h.

static void Room::setShowBoundingBox ( bool  s)
inlinestatic

Definition at line 54 of file Room.h.

static bool Room::getShowBoundingBox ( )
inlinestatic

Definition at line 55 of file Room.h.

static void Room::setShowRoomModels ( bool  s)
inlinestatic

Definition at line 57 of file Room.h.

static bool Room::getShowRoomModels ( )
inlinestatic

Definition at line 58 of file Room.h.

static void Room::setShowRoomSprites ( bool  s)
inlinestatic

Definition at line 60 of file Room.h.

static bool Room::getShowRoomSprites ( )
inlinestatic

Definition at line 61 of file Room.h.

static void Room::setShowRoomGeometry ( bool  s)
inlinestatic

Definition at line 63 of file Room.h.

static bool Room::getShowRoomGeometry ( )
inlinestatic

Definition at line 64 of file Room.h.

Member Data Documentation

glm::vec3 Room::pos
private

Definition at line 67 of file Room.h.

glm::mat4 Room::model
private

Definition at line 68 of file Room.h.

std::unique_ptr<BoundingBox> Room::bbox
private

Definition at line 69 of file Room.h.

std::unique_ptr<RoomMesh> Room::mesh
private

Definition at line 70 of file Room.h.

unsigned int Room::flags
private

Definition at line 72 of file Room.h.

int Room::alternateRoom
private

Definition at line 73 of file Room.h.

int Room::numXSectors
private

Definition at line 74 of file Room.h.

int Room::numZSectors
private

Definition at line 75 of file Room.h.

int Room::roomIndex
private

Definition at line 76 of file Room.h.

std::vector<std::unique_ptr<RoomSprite> > Room::sprites
private

Definition at line 78 of file Room.h.

std::vector<std::unique_ptr<StaticModel> > Room::models
private

Definition at line 79 of file Room.h.

std::vector<std::unique_ptr<Portal> > Room::portals
private

Definition at line 80 of file Room.h.

std::vector<std::unique_ptr<Sector> > Room::sectors
private

Definition at line 81 of file Room.h.

bool Room::showBoundingBox = false
staticprivate

Definition at line 83 of file Room.h.

bool Room::showRoomModels = true
staticprivate

Definition at line 84 of file Room.h.

bool Room::showRoomSprites = true
staticprivate

Definition at line 85 of file Room.h.

bool Room::showRoomGeometry = true
staticprivate

Definition at line 86 of file Room.h.


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