Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes
Ogre::TerrainGlobalOptions Class Reference

Options class which just stores default options for the terrain. More...

#include <OgreTerrain.h>

Inheritance diagram for Ogre::TerrainGlobalOptions:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 TerrainGlobalOptions ()
virtual ~TerrainGlobalOptions ()
void addQueryFlags (uint32 flags)
 As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this object.
bool getCastsDynamicShadows () const
 Whether the terrain will be able to cast shadows (texture shadows only are supported, and you must be using depth shadow maps).
const ColourValuegetCompositeMapAmbient () const
 Get the composite map ambient light to use.
const ColourValuegetCompositeMapDiffuse () const
 Get the composite map iffuse light to use.
Real getCompositeMapDistance () const
 Get the distance at which to start using a composite map if present.
uint16 getCompositeMapSize () const
 Get the default size of the composite maps for a new terrain.
uint16 getDefaultGlobalColourMapSize () const
 Get the default size of the terrain global colour map for a new terrain.
Real getDefaultLayerTextureWorldSize () const
 Get the default world size for a layer 'splat' texture to cover.
TerrainMaterialGeneratorPtr getDefaultMaterialGenerator ()
 Get the default material generator.
const StringgetDefaultResourceGroup () const
 Get the default resource group to use to load / save terrains.
uint16 getLayerBlendMapSize () const
 Get the default size of the blend maps for a new terrain.
const Vector3getLightMapDirection () const
 Get the shadow map light direction to use (world space)
uint16 getLightMapSize () const
 Get the default size of the lightmaps for a new terrain.
Real getMaxPixelError () const
 Get the maximum screen pixel error that should be allowed when rendering.
uint32 getQueryFlags (void) const
 Get the default query flags for terrains.
uint8 getRenderQueueGroup (void) const
 Get the render queue group that this terrain will be rendered into.
Real getSkirtSize () const
 The default size of 'skirts' used to hide terrain cracks (default 10)
bool getUseRayBoxDistanceCalculation () const
 Returns whether or not to use an accurate calculation of camera distance from a terrain tile (ray / AABB intersection) or whether to use the simpler distance from the tile centre.
bool getUseVertexCompressionWhenAvailable () const
 Get whether to allow vertex compression to be used when the material generator states that it supports it.
uint32 getVisibilityFlags (void) const
 Get the visbility flags that terrains will be rendered with.
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
void * operator new (size_t sz)
void * operator new (size_t sz, void *ptr)
 placement operator new
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info
void * operator new[] (size_t sz)
void removeQueryFlags (uint32 flags)
void setCastsDynamicShadows (bool s)
 Whether the terrain will be able to cast shadows (texture shadows only are supported, and you must be using depth shadow maps).
void setCompositeMapAmbient (const ColourValue &c)
 Set the composite map ambient light to use.
void setCompositeMapDiffuse (const ColourValue &c)
 Set the composite map diffuse light to use.
void setCompositeMapDistance (Real c)
 Set the distance at which to start using a composite map if present.
void setCompositeMapSize (uint16 sz)
 Sets the default size of composite maps for a new terrain.
void setDefaultGlobalColourMapSize (uint16 sz)
 Set the default size of the terrain global colour map for a new terrain.
void setDefaultLayerTextureWorldSize (Real sz)
 Set the default world size for a layer 'splat' texture to cover.
void setDefaultMaterialGenerator (TerrainMaterialGeneratorPtr gen)
 Set the default material generator.
void setDefaultResourceGroup (const String &grp)
 Set the default resource group to use to load / save terrains.
void setLayerBlendMapSize (uint16 sz)
 Sets the default size of blend maps for a new terrain.
void setLightMapDirection (const Vector3 &v)
 Set the shadow map light direction to use (world space).
void setLightMapSize (uint16 sz)
 Sets the default size of lightmaps for a new terrain.
void setMaxPixelError (Real pixerr)
 Set the maximum screen pixel error that should be allowed when rendering.
void setQueryFlags (uint32 flags)
 Set the default query flags for terrains.
void setRenderQueueGroup (uint8 grp)
 Set the render queue group that terrains will be rendered into.
void setSkirtSize (Real skirtSz)
 method - the default size of 'skirts' used to hide terrain cracks (default 10)
void setUseRayBoxDistanceCalculation (bool rb)
 Sets whether to use an accurate ray / box intersection to determine distance from a terrain tile, or whether to use the simple distance from the tile centre.
void setUseVertexCompressionWhenAvailable (bool enable)
 Set whether to allow vertex compression to be used when the material generator states that it supports it.
void setVisibilityFlags (uint32 flags)
 Set the visbility flags that terrains will be rendered with.

Static Public Member Functions

static TerrainGlobalOptionsgetSingleton (void)
 Override standard Singleton retrieval.
static TerrainGlobalOptionsgetSingletonPtr (void)
 Override standard Singleton retrieval.

Protected Attributes

bool mCastsShadows
ColourValue mCompositeMapAmbient
ColourValue mCompositeMapDiffuse
Real mCompositeMapDistance
uint16 mCompositeMapSize
uint16 mDefaultGlobalColourMapSize
Real mDefaultLayerTextureWorldSize
TerrainMaterialGeneratorPtr mDefaultMaterialGenerator
uint16 mLayerBlendMapSize
Vector3 mLightMapDir
uint16 mLightmapSize
Real mMaxPixelError
uint32 mQueryFlags
uint8 mRenderQueueGroup
String mResourceGroup
Real mSkirtSize
bool mUseRayBoxDistanceCalculation
bool mUseVertexCompressionWhenAvailable
uint32 mVisibilityFlags

Static Protected Attributes

static TerrainGlobalOptionsmsSingleton

Detailed Description

Options class which just stores default options for the terrain.

Remarks:
None of these options are stored with the terrain when saved. They are options that you can use to modify the behaviour of the terrain when it is loaded or created.
Note:
You should construct a single instance of this class per application and do so before you start working with any other terrain classes.

Definition at line 1906 of file OgreTerrain.h.


Constructor & Destructor Documentation

Definition at line 1932 of file OgreTerrain.h.


Member Function Documentation

As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this object.

Definition at line 2011 of file OgreTerrain.h.

Whether the terrain will be able to cast shadows (texture shadows only are supported, and you must be using depth shadow maps).

Definition at line 1966 of file OgreTerrain.h.

Get the composite map ambient light to use.

Definition at line 1950 of file OgreTerrain.h.

Get the composite map iffuse light to use.

Definition at line 1954 of file OgreTerrain.h.

Get the distance at which to start using a composite map if present.

Definition at line 1958 of file OgreTerrain.h.

Get the default size of the composite maps for a new terrain.

Definition at line 2081 of file OgreTerrain.h.

Get the default size of the terrain global colour map for a new terrain.

Definition at line 2063 of file OgreTerrain.h.

Get the default world size for a layer 'splat' texture to cover.

Definition at line 2055 of file OgreTerrain.h.

Get the default material generator.

Get the default resource group to use to load / save terrains.

Definition at line 2093 of file OgreTerrain.h.

Get the default size of the blend maps for a new terrain.

Definition at line 2045 of file OgreTerrain.h.

Get the shadow map light direction to use (world space)

Definition at line 1946 of file OgreTerrain.h.

Get the default size of the lightmaps for a new terrain.

Definition at line 2073 of file OgreTerrain.h.

Get the maximum screen pixel error that should be allowed when rendering.

Definition at line 1976 of file OgreTerrain.h.

Get the default query flags for terrains.

Definition at line 2008 of file OgreTerrain.h.

Get the render queue group that this terrain will be rendered into.

Definition at line 1986 of file OgreTerrain.h.

Override standard Singleton retrieval.

Remarks:
Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll.
This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.

Reimplemented from Ogre::Singleton< TerrainGlobalOptions >.

Override standard Singleton retrieval.

Remarks:
Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll.
This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.

Reimplemented from Ogre::Singleton< TerrainGlobalOptions >.

The default size of 'skirts' used to hide terrain cracks (default 10)

Definition at line 1938 of file OgreTerrain.h.

Returns whether or not to use an accurate calculation of camera distance from a terrain tile (ray / AABB intersection) or whether to use the simpler distance from the tile centre.

Definition at line 2020 of file OgreTerrain.h.

Get whether to allow vertex compression to be used when the material generator states that it supports it.

Definition at line 2098 of file OgreTerrain.h.

Get the visbility flags that terrains will be rendered with.

Definition at line 1994 of file OgreTerrain.h.

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

Definition at line 96 of file OgreMemoryAllocatedObject.h.

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

Definition at line 102 of file OgreMemoryAllocatedObject.h.

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

Definition at line 108 of file OgreMemoryAllocatedObject.h.

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

Definition at line 113 of file OgreMemoryAllocatedObject.h.

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

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 
) [inherited]

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) [inherited]

Definition at line 73 of file OgreMemoryAllocatedObject.h.

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

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 
) [inherited]

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) [inherited]

Definition at line 91 of file OgreMemoryAllocatedObject.h.

Definition at line 2014 of file OgreTerrain.h.

Whether the terrain will be able to cast shadows (texture shadows only are supported, and you must be using depth shadow maps).

This value can be set dynamically, and affects all existing terrains. It defaults to false.

Definition at line 1973 of file OgreTerrain.h.

Set the composite map ambient light to use.

Definition at line 1952 of file OgreTerrain.h.

Set the composite map diffuse light to use.

Definition at line 1956 of file OgreTerrain.h.

Set the distance at which to start using a composite map if present.

Definition at line 1960 of file OgreTerrain.h.

Sets the default size of composite maps for a new terrain.

Definition at line 2085 of file OgreTerrain.h.

Set the default size of the terrain global colour map for a new terrain.

Once created, this information will be stored with the terrain.

Definition at line 2068 of file OgreTerrain.h.

Set the default world size for a layer 'splat' texture to cover.

Definition at line 2059 of file OgreTerrain.h.

Set the default material generator.

Set the default resource group to use to load / save terrains.

Definition at line 2089 of file OgreTerrain.h.

Sets the default size of blend maps for a new terrain.

This is the resolution of each blending layer for a new terrain. Once created, this information will be stored with the terrain.

Definition at line 2051 of file OgreTerrain.h.

Set the shadow map light direction to use (world space).

Definition at line 1948 of file OgreTerrain.h.

Sets the default size of lightmaps for a new terrain.

Definition at line 2077 of file OgreTerrain.h.

Set the maximum screen pixel error that should be allowed when rendering.

Note:
This value can be varied dynamically and affects all existing terrains. It will be weighted by the LOD bias on viewports.

Definition at line 1983 of file OgreTerrain.h.

Set the default query flags for terrains.

Remarks:
This applies to newly created terrains, after which they will maintain their own settings

Definition at line 2005 of file OgreTerrain.h.

Set the render queue group that terrains will be rendered into.

Remarks:
This applies to newly created terrains, after which they will maintain their own queue group settings

Definition at line 1991 of file OgreTerrain.h.

method - the default size of 'skirts' used to hide terrain cracks (default 10)

Remarks:
Changing this value only applies to Terrain instances loaded / reloaded afterwards.

Definition at line 1944 of file OgreTerrain.h.

Sets whether to use an accurate ray / box intersection to determine distance from a terrain tile, or whether to use the simple distance from the tile centre.

Using ray/box intersection will result in higher detail terrain because the LOD calculation is more conservative, assuming the 'worst case scenario' of a large height difference at the edge of a tile. This is guaranteed to give you at least the max pixel error or better, but will often give you more detail than you need. Not using the ray/box method is cheaper but will only use the max pixel error as a guide, the actual error will vary above and below that. The default is not to use the ray/box approach.

Definition at line 2033 of file OgreTerrain.h.

Set whether to allow vertex compression to be used when the material generator states that it supports it.

Note:
You should only call this before creating any terrain instances. The default is true, so if a material generator supports compressed vertices, and so does the hardware (this basically means shader support), they will be used). However you can disable this in an emergency if required.

Definition at line 2107 of file OgreTerrain.h.

Set the visbility flags that terrains will be rendered with.

Remarks:
This applies to newly created terrains, after which they will maintain their own settings

Definition at line 1999 of file OgreTerrain.h.


Member Data Documentation

Definition at line 1912 of file OgreTerrain.h.

Definition at line 1924 of file OgreTerrain.h.

Definition at line 1925 of file OgreTerrain.h.

Definition at line 1926 of file OgreTerrain.h.

Definition at line 1923 of file OgreTerrain.h.

Definition at line 1921 of file OgreTerrain.h.

Definition at line 1920 of file OgreTerrain.h.

Definition at line 1918 of file OgreTerrain.h.

Definition at line 1919 of file OgreTerrain.h.

Definition at line 1911 of file OgreTerrain.h.

Definition at line 1922 of file OgreTerrain.h.

Definition at line 1913 of file OgreTerrain.h.

Definition at line 1916 of file OgreTerrain.h.

Definition at line 1914 of file OgreTerrain.h.

Definition at line 1927 of file OgreTerrain.h.

Definition at line 1910 of file OgreTerrain.h.

Definition at line 75 of file OgreSingleton.h.

Definition at line 1917 of file OgreTerrain.h.

Definition at line 1928 of file OgreTerrain.h.

Definition at line 1915 of file OgreTerrain.h.


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

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Mon Jul 27 2020 13:41:41