Mercator
Public Types | Public Member Functions | Private Attributes
Mercator::TileShader Class Reference

Shader agregating surface data. More...

#include <TileShader.h>

Inheritance diagram for Mercator::TileShader:
Mercator::Shader

List of all members.

Public Types

typedef std::map< int, Shader * > Shaderstore
 STL map to store sparse array of Shader pointers.

Public Member Functions

void addShader (Shader *t, int id)
 Add a shader to those agregated by the tile shader.
virtual bool checkIntersect (const Segment &) const
 Check whether this Shader has any effect on the given Segment.
virtual void shade (Surface &) const
 Populate a Surface with data.

Private Attributes

Shaderstore m_subShaders
 Store of shaders which are agregated by this shader.

Detailed Description

Shader agregating surface data.

Some applications require the terrain surface data be stored in a single buffer so specific locations can be queried to determine the type. Typically this is used on a server, where lots of surface data optimised for rendering is not required, but fast cheap queries about the surface at a specific point are required.


Member Function Documentation

bool Mercator::TileShader::checkIntersect ( const Segment ) const [virtual]

Check whether this Shader has any effect on the given Segment.

Returns:
true if the given Segment height range is within the range that this Shader uses. e.g. A high altitude snow shader will have no effect on low level terrain.

Implements Mercator::Shader.


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