#include <OgreBspLevel.h>
Inheritance diagram for Ogre::BspLevel:
Public Methods | |
BspLevel (String name) | |
Default constructor - used by BspResourceManager (do not call directly). More... | |
~BspLevel () | |
virtual void | load (void) |
Generic load - called by BspResourceManager. More... | |
virtual void | unload (void) |
Generic unload - called by BspResourceManager. More... | |
bool | isLeafVisible (const BspNode *from, const BspNode *to) const |
Determines if one leaf node is visible from another. More... | |
const BspNode * | getRootNode (void) |
Returns a pointer to the root node (BspNode) of the BSP tree. More... | |
BspNode * | findLeaf (const Vector3 &point) const |
Walks the entire BSP tree and returns the leaf which contains the given point. More... | |
virtual size_t | getSize (void) |
Retrieves info about the size of the resource. More... | |
void | touch (void) |
'Touches' the resource to indicate it has been used. More... | |
time_t | getLastAccess (void) const |
Gets the last time the resource was 'touched'. More... | |
const String & | getName (void) const |
Gets resource name. More... | |
bool | isLoaded (void) const |
Returns true if the Resource has been loaded, false otherwise. More... | |
virtual void | destroy () |
A method to make the resource delete itself. More... | |
Protected Methods | |
void | loadQuake3Level (const Quake3Level &q3lvl) |
Internal utility function for loading data from Quake3. More... | |
void | loadEntities (const Quake3Level &q3lvl) |
Internal method for parsing chosen entities. More... | |
Protected Attributes | |
BspNode * | mRootNode |
Pointer to the root node of the BSP tree; This pointer actually has a dual purpose; to avoid allocating lots of small chunks of memory, the BspLevel actually allocates all nodes required through this pointer. More... | |
int | mNumNodes |
int | mNumLeaves |
int | mLeafStart |
BspVertex * | mVertices |
Array of vertices for whole level. More... | |
int | mNumVertices |
int * | mLeafFaceGroups |
Array of indexes into the mFaceGroups array. More... | |
int | mNumLeafFaceGroups |
StaticFaceGroup * | mFaceGroups |
Array of face groups, indexed into by contents of mLeafFaceGroups. More... | |
int | mNumFaceGroups |
int * | mElements |
Array of elements i.e. More... | |
int | mNumElements |
std::vector< ViewPoint > | mPlayerStarts |
Vector of player start points. More... | |
VisData | mVisData |
String | mName |
bool | mIsLoaded |
time_t | mLastAccess |
size_t | mSize |
Friends | |
class | BspSceneManager |
The data used here is populated by loading level files via the BspLevelManager::load method, although application users are more likely to call SceneManager::setWorldGeometry which will automatically arrange the loading of the level. Note that this assumes that you have asked for an indoor-specialised SceneManager (specify ST_INDOOR when calling Root::getSceneManager). Ogre currently only supports loading from Quake3 Arena level files, although any source that can be converted into this classes structure could also be used. The Quake3 level load process is in a different class called Quake3Level to keep the specifics separate.
|
Default constructor - used by BspResourceManager (do not call directly).
|
|
|
|
A method to make the resource delete itself.
|
|
Walks the entire BSP tree and returns the leaf which contains the given point.
|
|
Gets the last time the resource was 'touched'.
|
|
Gets resource name.
Reimplemented in Ogre::Material. |
|
Returns a pointer to the root node (BspNode) of the BSP tree.
|
|
Retrieves info about the size of the resource.
|
|
Determines if one leaf node is visible from another.
|
|
Returns true if the Resource has been loaded, false otherwise.
|
|
Generic load - called by BspResourceManager.
Implements Ogre::Resource. |
|
Internal method for parsing chosen entities.
|
|
Internal utility function for loading data from Quake3.
|
|
'Touches' the resource to indicate it has been used.
|
|
Generic unload - called by BspResourceManager.
Reimplemented from Ogre::Resource. |
|
|
|
Array of elements i.e. vertex indexes as used by face groups. |
|
Array of face groups, indexed into by contents of mLeafFaceGroups.
|
|
|
|
|
|
Array of indexes into the mFaceGroups array. This buffer is organised by leaf node so leaves can just use contiguous chunks of it and get repointed to the actual entries in mFaceGroups. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Vector of player start points.
|
|
Pointer to the root node of the BSP tree; This pointer actually has a dual purpose; to avoid allocating lots of small chunks of memory, the BspLevel actually allocates all nodes required through this pointer. So this pointer is the handle for the allocation of memory for all nodes. It also happens to point to the root node, since the first one in the memory chunk is the root node. |
|
|
|
Array of vertices for whole level.
|
|
|
Copyright © 2002 by The OGRE Team