"L. Spiro Engine"
Classes | Typedefs | Functions | Variables

lst Namespace Reference

Classes

struct  LSD_TERRAIN_INSTANCE
class  CGeoClipmap2Mx1
 The (2M+1)-x-1 sections of the Geo Clipmap terrain technique. More...
class  CGeoClipmapBaseGrid
 Manages the resources and any logic necessary for the finest active level (L'-1). More...
class  CGeoClipmapInstance
 An instance of Geometry Clipmap terrain. More...
class  CGeoClipmapMx3
 The M-x-3 sections of the Geo Clipmap terrain technique. More...
class  CGeoClipmapMxM
 The 12 M-x-M sections of the Geo Clipmap terrain technique. More...
class  CGeoClipmapRenderPane
 A view from which the terrain will be rendered. More...
class  CGeoClipmapXxYGrid
 A Geo Clipmap grid of X-by-Y vertices. More...
class  CTerrainLib
 The main include file for the terrain library. More...

Typedefs

typedef struct
lst::LSD_TERRAIN_INSTANCE
LPLSD_TERRAIN_INSTANCE
typedef struct
lst::LSD_TERRAIN_INSTANCE 
LPCLSD_TERRAIN_INSTANCE

Functions

LSVOID LSE_CALL Reset ()
LSBOOL LSE_CALL SetGridSize (LSUINT32 _ui32N)
LSBOOL LSE_CALL AddTerrainInstance (const LSD_TERRAIN_INSTANCE &_itParms)
const CGeoClipmapBaseGrid &LSE_CALL DebugGetBaseGrid () const
LSVOID LSE_CALL ReleaseClipmap ()

Variables

__pad0__
CStdAllocator * m_psaAllocator
CAllocator m_aVecAllocator
CGeoClipmapBaseGrid m_gcbgBase
CGeoClipmapMxM m_gcmmGridMxM
CGeoClipmap2Mx1 m_gc2m1Grid2Mx1
CGeoClipmapMx3 m_gcm3GridMx3
LSUINT32 m_ui32ClipSize
CVectorPoD
< CGeoClipmapRenderPane
*, LSUINT32 > 
m_vRenderPanes
CVectorPoD< CGeoClipmapInstance * > m_pvInstances

Detailed Description

Copyright L. Spiro 2011 All rights reserved.

Written by: Shawn (L. Spiro) Wilcoxen

This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.

Description: Implementation of the Geometry Clipmapping terrain technique. This class acts as the manager for our Geometry Clipmapping implementation. It holds the shared data needed to render terrain, but does not directly render the terrain. It leaves that job up to the CGeoClipmapInstance class. A combination of multiple CGeoClipmapInstance instances compose the final world terrain (though more than one is not necessary for regular terrain).

Copyright L. Spiro 2011 All rights reserved.

Written by: Shawn (L. Spiro) Wilcoxen

This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.

Description: The (2M+1)-x-1 sections of the Geo Clipmap terrain technique.

Copyright L. Spiro 2011 All rights reserved.

Written by: Shawn (L. Spiro) Wilcoxen

This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.

Description: Manages the resources and any logic necessary for the finest active level (L'-1).

Copyright L. Spiro 2011 All rights reserved.

Written by: Shawn (L. Spiro) Wilcoxen

This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.

Description: An instance of Geometry Clipmap terrain. While the CGeoClipmap class handles the shared vertex and index buffers, this class manages each instance of actual terrain in the world. The CGeoClipmap acts as a manager for this class and maintains the master list of Geometry Clipmapping instances, passing the shared vertex and index buffers down when it is time to render. Instances can be loaded with any transform. This allows multiple instances to be combined to create caves, overhangs, etc., but most maps will have only one instance.

Copyright L. Spiro 2011 All rights reserved.

Written by: Shawn (L. Spiro) Wilcoxen

This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.

Description: The M-x-3 sections of the Geo Clipmap terrain technique.

Copyright L. Spiro 2011 All rights reserved.

Written by: Shawn (L. Spiro) Wilcoxen

This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.

Description: The 12 M-x-M sections of the Geo Clipmap terrain technique.

Copyright L. Spiro 2011 All rights reserved.

Written by: Shawn (L. Spiro) Wilcoxen

This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.

Description: A view from which the terrain will be rendered. This is typically the main view of the player, or the active camera, however multiple cameras may be active for a number of reasons. If there is only a single player in the world, one render pane exists. If the game is split-screen for two players, two render panes will exist. If an object is real-time reflective and part of generating that flection involves terrain, another view pane will exist for that render object.

Copyright L. Spiro 2011 All rights reserved.

Written by: Shawn (L. Spiro) Wilcoxen

This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.

Description: A Geo Clipmap grid of X-by-Y vertices.


Typedef Documentation

The data in this structure is used by the CGeoClipmap class to create new terrain instances.


Function Documentation

LSBOOL LSE_CALL lst::AddTerrainInstance ( const LSD_TERRAIN_INSTANCE &  _itParms)

Add a terrain instance. Multiple terrain instances can be combined to create interesting effects such as caves and overhangs.

Parameters:
_itParmsThe terrain instance parameters.
Returns:
Returns true if the terrain instance was created.
const CGeoClipmapBaseGrid& LSE_CALL lst::DebugGetBaseGrid ( ) const

Get our base clipmap. This is for debug only.

Returns:
Returns the base clipmap grid.
LSVOID LSE_CALL lst::ReleaseClipmap ( ) [protected]

Create resources for the given clipmap size N. Causes previous clipmap resources to be lost and can cause stutter if used during runtime. Clipmap sizes are usually not changed during run-time, but could change if the user changes detail settings etc.

Parameters:
_ui32NThe new clipmap size.
Returns:
Returns true if all resources were created successfully. Release clipmap resources. Only resources related to the grid are released.
LSVOID LSE_CALL lst::Reset ( )

Reset everything to scratch. Fully releases all memory and resources.

Reset everything. Clears all resources created by this instance.

Reset all contents.

LSBOOL LSE_CALL lst::SetGridSize ( LSUINT32  _ui32N)

Set the grid size N. This is the number of vertices across each level and must be an odd number and must satisfy the equation ? * 4 + 1 = N, where ? is a whole number. In other words, N must be a value that is 1 less than multiple of 4. N must also be above or equal to 13, and less than 1,023.

Parameters:
_ui32NThe new dimensions of the base grid in vertices. The old grid is lost if this value is not the same as the current grid size.
Returns:
Returns if _ui32N meets the outlined parameters above and there are no memory failures while creating the resources.

Variable Documentation

Allocator for vectors. It uses m_psaAllocator.

The (2M+1)-x-2 grid.

The base clipmap.

The M-x-3 grid.

The M-x-M grid.

CStdAllocator* lst::m_psaAllocator

Allocator to use for all allocations made by this object.

Geometry Clipmap instances.

The clipmap size.

CVectorPoD<CGeoClipmapRenderPane *, LSUINT32> lst::m_vRenderPanes

Render panes.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator