OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ogre::TerrainPaging Class Reference

This class is the 'core' class for paging terrain, that will integrate with the larger paging system and provide the appropriate utility classes required. More...

#include <OgreTerrainPaging.h>

+ Inheritance diagram for Ogre::TerrainPaging:
+ Collaboration diagram for Ogre::TerrainPaging:

Classes

class  SectionFactory
 

Public Member Functions

 TerrainPaging (PageManager *pageMgr)
 Constructor. More...
 
virtual ~TerrainPaging ()
 
TerrainPagedWorldSectioncreateWorldSection (PagedWorld *world, TerrainGroup *terrainGroup, Real loadRadius, Real holdRadius, int32 minX=-10, int32 minY=-10, int32 maxX=10, int32 maxY=10, const String &sectionName=StringUtil::BLANK, uint32 loadingIntervalMs=900)
 Create a TerrainPagedWorldSection. More...
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, void *)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void * operator new[] (size_t sz)
 

Protected Attributes

PageManagermManager
 
SectionFactory mSectionFactory
 

Detailed Description

This class is the 'core' class for paging terrain, that will integrate with the larger paging system and provide the appropriate utility classes required.

Remarks
You should construct this class after PageManager and before any PagedWorlds that might use it are created / loaded. Once constructed, it will make the "Terrain" PagedWorldSection type available, which uses a grid strategy for paging and uses TerrainGroup for the content. Other content can be embedded in the pages too but the terrain is done like this in order to maintain connections between pages and other global data.
Because PagedWorld and all attached classes have to be loadable from a stream, most of the functionality is provided behind generalised interfaces. However, for constructing a paged terrain in code you can use utility methods on this class. This procedurally created data can then be saved in a generic form which will reconstruct on loading. Alternatively you can use the generic methods and simply cast based on your prior knowledge of the types (or checking the type names exposed).

Definition at line 72 of file OgreTerrainPaging.h.

Constructor & Destructor Documentation

Ogre::TerrainPaging::TerrainPaging ( PageManager pageMgr)

Constructor.

Parameters
pageMgrThe PageManager which this class should attach to.
virtual Ogre::TerrainPaging::~TerrainPaging ( )
virtual

Member Function Documentation

TerrainPagedWorldSection* Ogre::TerrainPaging::createWorldSection ( PagedWorld world,
TerrainGroup terrainGroup,
Real  loadRadius,
Real  holdRadius,
int32  minX = -10,
int32  minY = -10,
int32  maxX = 10,
int32  maxY = 10,
const String sectionName = StringUtil::BLANK,
uint32  loadingIntervalMs = 900 
)

Create a TerrainPagedWorldSection.

Remarks
This is the simplest way to create a world section which is configured to contain terrain (among other objects if you want). You can also do this by calling PagedWorld::createSection with the type "Terrain" but there are more steps to configuring it that way (note: this is how loading works though so it remains generic).
Parameters
worldThe PagedWorld that is to contain this section
terrainGroupA TerrainGroup which must have been pre-configured before this call, to at least set the origin, the world size, and the file name convention.
loadRadiusThe radius from the camera at which terrain pages will be loaded
holdRadiusThe radius from the camera at which terrain pages will be held in memory but not loaded if they're not already. This must be larger than loadRadius and is used to minimise thrashing if the camera goes backwards and forwards at the loading border.
minX,minY,maxX,maxYThe min/max page indexes that the world will try to load pages for, as measured from the origin page at (0,0) by a signed index. The default is -10 to 10 in each direction or 20x20 pages.
sectionNameAn optional name to give the section (if none is provided, one will be generated)
loadingIntervalMsAn optional interval in milliseconds to wait between loading single pages. The default is 900 ms.
Returns
The world section which is already attached to and owned by the world you passed in. There is no 'destroy' method because you destroy via the PagedWorld, this is just a helper function.
template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
)
inlineinherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr)
inlineinherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void *  ptr 
)
inlineinherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

Member Data Documentation

PageManager* Ogre::TerrainPaging::mManager
protected

Definition at line 113 of file OgreTerrainPaging.h.

SectionFactory Ogre::TerrainPaging::mSectionFactory
protected

Definition at line 125 of file OgreTerrainPaging.h.


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