#include <OgreQuake3Level.h>
Public Member Functions | |
Quake3Level () | |
void | loadHeaderFromStream (DataStreamPtr &inStream) |
Load just the header information from a Quake3 file. | |
void | loadFromStream (DataStreamPtr &inStream) |
Reads Quake3 bsp data from a stream as read from the file. | |
void | extractLightmaps (void) const |
void | initialise (bool headerOnly=false) |
Utility function read the header and set up pointers. | |
void | initialiseCounts (void) |
Utility function read the header and set up counters. | |
void | initialisePointers (void) |
Utility function read the header and set up pointers. | |
void * | getLump (int lumpType) |
Utility function to return a pointer to a lump. | |
int | getLumpSize (int lumpType) |
void | dumpContents (void) |
Debug method. | |
Public Attributes | |
MemoryDataStreamPtr | mChunk |
bsp_header_t * | mHeader |
unsigned char * | mLumpStart |
int * | mElements |
int | mNumElements |
void * | mEntities |
int | mNumEntities |
bsp_model_t * | mModels |
int | mNumModels |
bsp_node_t * | mNodes |
int | mNumNodes |
bsp_leaf_t * | mLeaves |
int | mNumLeaves |
int * | mLeafFaces |
int | mNumLeafFaces |
bsp_plane_t * | mPlanes |
int | mNumPlanes |
bsp_face_t * | mFaces |
int | mNumFaces |
bsp_vertex_t * | mVertices |
int | mNumVertices |
bsp_shader_t * | mShaders |
int | mNumShaders |
unsigned char * | mLightmaps |
int | mNumLightmaps |
bsp_vis_t * | mVis |
bsp_brush_t * | mBrushes |
int | mNumBrushes |
bsp_brushside_t * | mBrushSides |
int | mNumBrushSides |
int * | mLeafBrushes |
int | mNumLeafBrushes |
This class implements the required methods for opening Quake3 level files and extracting the pertinent data within. Ogre supports BSP based levels through it's own BspLevel class, which is not specific to any file format, so this class is here to source that data from the Quake3 format. Quake3 levels include far more than just data for rendering - typically the leaves of the tree are used for rendering, and brushes, are used to define convex hulls made of planes for collision detection. There are also entities which define non-visual elements like player start points, triggers etc and models which are used for movable scenery like doors and platforms. Shaders meanwhile are textures with extra effects and 'content flags' indicating special properties like water or lava. I will try to support as much of this as I can in Ogre, but I won't duplicate the structure or necesarily use the same terminology. Quake3 is designed for a very specific purpose and code structure, whereas Ogre is designed to be more flexible, so for example I'm likely to separate game-related properties like surface flags from the generics of materials in my implementation. This is a utility class only - a single call to loadFromChunk should be enough. You should not expect the state of this object to be consistent between calls, since it uses pointers to memory which may no longer be valid after the original call. This is why it has no accessor methods for reading it's internal state.
Definition at line 59 of file OgreQuake3Level.h.
|
|
|
Debug method.
|
|
|
|
Utility function to return a pointer to a lump.
|
|
|
|
Utility function read the header and set up pointers.
|
|
Utility function read the header and set up counters.
|
|
Utility function read the header and set up pointers.
|
|
Reads Quake3 bsp data from a stream as read from the file. Since ResourceManagers generally locate data in a variety of places they typically manipulate them as a chunk of data, rather than a file pointer since this is unsupported through compressed archives. Quake3 files are made up of a header (which contains version info and a table of the contents) and 17 'lumps' i.e. sections of data, the offsets to which are kept in the table of contents. The 17 types are predefined (You can find them in OgreQuake3Types.h)
|
|
Load just the header information from a Quake3 file.
|
|
Definition at line 149 of file OgreQuake3Level.h. |
|
Definition at line 152 of file OgreQuake3Level.h. |
|
Definition at line 108 of file OgreQuake3Level.h. |
|
Definition at line 114 of file OgreQuake3Level.h. |
|
Definition at line 117 of file OgreQuake3Level.h. |
|
Definition at line 135 of file OgreQuake3Level.h. |
|
Definition at line 111 of file OgreQuake3Level.h. |
|
Definition at line 155 of file OgreQuake3Level.h. |
|
Definition at line 129 of file OgreQuake3Level.h. |
|
Definition at line 126 of file OgreQuake3Level.h. |
|
Definition at line 144 of file OgreQuake3Level.h. |
|
Definition at line 112 of file OgreQuake3Level.h. |
|
Definition at line 120 of file OgreQuake3Level.h. |
|
Definition at line 123 of file OgreQuake3Level.h. |
|
Definition at line 150 of file OgreQuake3Level.h. |
|
Definition at line 153 of file OgreQuake3Level.h. |
|
Definition at line 115 of file OgreQuake3Level.h. |
|
Definition at line 118 of file OgreQuake3Level.h. |
|
Definition at line 136 of file OgreQuake3Level.h. |
|
Definition at line 156 of file OgreQuake3Level.h. |
|
Definition at line 130 of file OgreQuake3Level.h. |
|
Definition at line 127 of file OgreQuake3Level.h. |
|
Definition at line 145 of file OgreQuake3Level.h. |
|
Definition at line 121 of file OgreQuake3Level.h. |
|
Definition at line 124 of file OgreQuake3Level.h. |
|
Definition at line 133 of file OgreQuake3Level.h. |
|
Definition at line 142 of file OgreQuake3Level.h. |
|
Definition at line 139 of file OgreQuake3Level.h. |
|
Definition at line 132 of file OgreQuake3Level.h. |
|
Definition at line 141 of file OgreQuake3Level.h. |
|
Definition at line 138 of file OgreQuake3Level.h. |
|
Definition at line 147 of file OgreQuake3Level.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:47:02 2006