Public Member Functions | Protected Member Functions

Level Class Reference

Level class. More...

#include <Level.h>

List of all members.

Public Member Functions

 Level (IPhysic &physic, IRender &render)
 Constructor.
 ~Level ()
 Destructor.
bool load (const wchar *filename, const wchar *textureDir)
bool loadGeometry (const wchar *filename, const char *name, pIGeometry &geometry)
bool loadGeometry (const wchar *filename, const char *name, pIGeometry &geometry, MeshData &meshData)
void unload (void)
 Unload the level.
float3 getStart (void)
bool intersectsEnd (float3 pos, float radius=1.f)
int intersectsItem (float3 pos, float radius=1.f)
LevelItemgetItem (int index)
void removeItem (int index)
void setItemGeometry (CannonballType type, pIGeometry geometry)

Protected Member Functions

bool loadMeshData (FILE *file, MeshData &meshData, const char *name=0)
bool loadUnknown (const wchar *filename, int &width, int &height, Pixel **outData)
bool loadTextureData (const wchar *colorFilename, const wchar *normalFilename, const wchar *heightFilename, TextureData &out)
bool loadBMP (const wchar *filename, int &width, int &height, Pixel **outData)
bool loadTGA (const wchar *filename, int &width, int &height, Pixel **outData)

Detailed Description

Level class.

Definition at line 50 of file Level.h.


Constructor & Destructor Documentation

Level::Level ( IPhysic physic,
IRender render 
)

Constructor.

Definition at line 23 of file Level.cpp.

Level::~Level (  ) 

Destructor.

Definition at line 39 of file Level.cpp.


Member Function Documentation

LevelItem& Level::getItem ( int  index  )  [inline]

Definition at line 83 of file Level.h.

float3 Level::getStart ( void   )  [inline]

Definition at line 68 of file Level.h.

bool Level::intersectsEnd ( float3  pos,
float  radius = 1.f 
) [inline]

Definition at line 70 of file Level.h.

int Level::intersectsItem ( float3  pos,
float  radius = 1.f 
) [inline]

Definition at line 74 of file Level.h.

bool Level::load ( const wchar filename,
const wchar textureDir 
)

Load a level from the specified file and use the textures in the specified directory.

Definition at line 224 of file Level.cpp.

bool Level::loadBMP ( const wchar filename,
int &  width,
int &  height,
Pixel **  outData 
) [protected]

Definition at line 112 of file LevelBMP.cpp.

bool Level::loadGeometry ( const wchar filename,
const char *  name,
pIGeometry geometry 
)

Definition at line 515 of file Level.cpp.

bool Level::loadGeometry ( const wchar filename,
const char *  name,
pIGeometry geometry,
MeshData meshData 
)

Definition at line 560 of file Level.cpp.

bool Level::loadMeshData ( FILE *  file,
MeshData meshData,
const char *  name = 0 
) [protected]

Definition at line 43 of file Level.cpp.

bool Level::loadTextureData ( const wchar colorFilename,
const wchar normalFilename,
const wchar heightFilename,
TextureData out 
) [protected]

Definition at line 106 of file Level.cpp.

bool Level::loadTGA ( const wchar filename,
int &  width,
int &  height,
Pixel **  outData 
) [protected]

Definition at line 171 of file LevelTGA.cpp.

bool Level::loadUnknown ( const wchar filename,
int &  width,
int &  height,
Pixel **  outData 
) [protected]

Definition at line 88 of file Level.cpp.

void Level::removeItem ( int  index  )  [inline]

Definition at line 87 of file Level.h.

void Level::setItemGeometry ( CannonballType  type,
pIGeometry  geometry 
) [inline]

Definition at line 93 of file Level.h.

void Level::unload ( void   ) 

Unload the level.

Definition at line 605 of file Level.cpp.


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