proland::DrawTerrainTask::Impl Class Reference

A Task to draw a terrain. More...

List of all members.

Public Member Functions

 Impl (ptr< SceneNode > n, ptr< TerrainNode > t, ptr< MeshBuffers > m, bool culling)
 Creates a new Impl.
virtual ~Impl ()
 Deletes this Impl.
void findDrawableQuads (ptr< TerrainQuad > q, const vector< ptr< TileSampler > > &uniforms)
 Finds the quads whose associated tiles are ready (this may not be the case of all quads if async is true).
void drawQuad (ptr< TerrainQuad > q, const vector< ptr< TileSampler > > &uniforms)
 Draw the mesh m for the leaf quads of the given quadtree.

Public Attributes

ptr< SceneNode > n
 The SceneNode describing the terrain position and its associated data (via TileSampler fields).
ptr< TerrainNodet
 The TerrainNode describing the terrain and its quadtree.
ptr< MeshBuffers > m
 The mesh to be drawn for each leaf quad.
bool culling
 True to draw only visible leaf quads, false to draw all leaf quads.
bool async
 True if one the TileSampler associated with this terrain uses the asynchronous mode.
int gridSize
 Number of primitives (triangles, lines, etc) per *quarter* of the grid mesh.

Detailed Description

A Task to draw a terrain.


Constructor & Destructor Documentation

proland::DrawTerrainTask::Impl::Impl ( ptr< SceneNode >  n,
ptr< TerrainNode t,
ptr< MeshBuffers >  m,
bool  culling 
)

Creates a new Impl.

Parameters:
n the SceneNode describing the terrain position.
t the TerrainNode describing the terrain and its quadtree.
m the mesh to be drawn for each leaf quad.
culling true to draw only visible leaf quads.
virtual proland::DrawTerrainTask::Impl::~Impl (  )  [virtual]

Deletes this Impl.


Member Function Documentation

void proland::DrawTerrainTask::Impl::drawQuad ( ptr< TerrainQuad q,
const vector< ptr< TileSampler > > &  uniforms 
)

Draw the mesh m for the leaf quads of the given quadtree.

Before drawing each quad, this method calls Deformation::setUniforms for this quad, and calls TileSampler::setTile on each TileSampler the given uniforms vector.

Parameters:
q the terrain quadtree to be drawn.
uniforms the TileSampler associated with the terrain.
void proland::DrawTerrainTask::Impl::findDrawableQuads ( ptr< TerrainQuad q,
const vector< ptr< TileSampler > > &  uniforms 
)

Finds the quads whose associated tiles are ready (this may not be the case of all quads if async is true).

Parameters:
q the terrain quadtree to be drawn.
uniforms the TileSampler associated with the terrain.

Member Data Documentation

True if one the TileSampler associated with this terrain uses the asynchronous mode.

True to draw only visible leaf quads, false to draw all leaf quads.

Number of primitives (triangles, lines, etc) per *quarter* of the grid mesh.

Used to draw only parts of the mesh to fill holes when using asynchronous mode.

The mesh to be drawn for each leaf quad.

The SceneNode describing the terrain position and its associated data (via TileSampler fields).

The TerrainNode describing the terrain and its quadtree.


Generated on Sat May 12 09:41:38 2012 for proland by  doxygen 1.6.1