Mercator::Surface Class Reference

Data store for terrain surface data. More...

#include <Surface.h>

Inheritance diagram for Mercator::Surface:

Mercator::Buffer< DataType >

List of all members.

Public Member Functions

 Surface (const Segment &segment, const Shader &shader, bool colors=true, bool alpha=true)
 Constructor.
void populate ()
 Populate the data buffer using the correct shader.

Public Attributes

const Shaderm_shader
 The shader that populates this surface.


Detailed Description

Data store for terrain surface data.

Constructor & Destructor Documentation

Mercator::Surface::Surface ( const Segment seg,
const Shader sh,
bool  color = true,
bool  alpha = true 
) [explicit]

Constructor.

Parameters:
seg the terrain height segment this surface maps on to.
sh the shader used to generate the surface data.
color true if this shader contains color data.
alpha true if this shader contains alpha data.


Member Function Documentation

void Mercator::Surface::populate (  ) 

Populate the data buffer using the correct shader.

Call the shader to full this surface buffer with surface data.

References Mercator::Buffer< DataType >::allocate(), Mercator::Shader::checkIntersect(), Mercator::Buffer< DataType >::isValid(), Mercator::Buffer< DataType >::m_segment, m_shader, and Mercator::Shader::shade().

Referenced by Mercator::TileShader::shade().


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

Generated for Mercator by  doxygen 1.5.6