proland::OrthoProducer Class Reference
[ortho]

A TileProducer to create texture tiles on GPU from CPU residual tiles. More...

#include <OrthoProducer.h>

List of all members.

Public Member Functions

 OrthoProducer (ptr< TileCache > cache, ptr< TileProducer > residualTiles, ptr< Texture2D > orthoTexture, ptr< Texture2D > residualTexture, ptr< Program > upsample, vec4f rootNoiseColor, vec4f noiseColor, vector< float > &noiseAmp, bool noiseHsv, float scale, int maxLevel)
 Creates a new OrthoProducer.
virtual ~OrthoProducer ()
 Deletes this OrthoProducer.

Protected Member Functions

 OrthoProducer ()
 Creates an uninitialized OrthoProducer.
void init (ptr< TileCache > cache, ptr< TileProducer > residualTiles, ptr< Texture2D > orthoTexture, ptr< Texture2D > residualTexture, ptr< Program > upsample, vec4f rootNoiseColor, vec4f noiseColor, vector< float > &noiseAmp, bool noiseHsv, float scale, int maxLevel)
 Initializes this OrthoProducer.
void init (ptr< ResourceManager > manager, Resource *r, const string &name, ptr< ResourceDescriptor > desc, const TiXmlElement *e=NULL)
 Initializes this OrthoProducer from a Resource.

Protected Attributes

ptr< TileProducer > residualTiles
 The producer producing the residual tiles.
ptr< Texture2D > orthoTexture
 A texture used to produce the tiles.
ptr< Texture2D > residualTexture
 A texture used to produce the tiles.
int face
 Cube face ID for producers targeting spherical terrains.
ptr< Program > upsample
 The Program to perform the upsampling and add procedure on GPU.

Private Attributes

int channels
 The number of components per pixel in the CPU residual tiles.
int maxLevel
 Maximum quadtree level, or -1 to allow any level.
float scale
 Scaling factor used for residual values.

Detailed Description

A TileProducer to create texture tiles on GPU from CPU residual tiles.

See Ortho producer.

Authors:
Eric Bruneton, Antoine Begault

Constructor & Destructor Documentation

proland::OrthoProducer::OrthoProducer ( ptr< TileCache >  cache,
ptr< TileProducer >  residualTiles,
ptr< Texture2D >  orthoTexture,
ptr< Texture2D >  residualTexture,
ptr< Program >  upsample,
vec4f  rootNoiseColor,
vec4f  noiseColor,
vector< float > &  noiseAmp,
bool  noiseHsv,
float  scale,
int  maxLevel 
)

Creates a new OrthoProducer.

Parameters:
cache the cache to store the produced tiles. The underlying storage must be a GPUTileStorage.
residualTiles the producer producing the residual tiles. This producer should produce its tiles in a CPUTileStorage of unsigned ybte type. The size of the residual tiles (without borders) must be equal to the size of the produced tiles (without borders). The border sizes must be the same.
orthoTexture a texture used to produce the tiles. Its size must be equal to the produced tile size (including borders).
residualTexture a texture used to produce the tiles. Its size must be equal to the produced tile size (including borders).
upsample the Program to perform the upsampling and add procedure on GPU. See Ortho producer.
scale scaling factor used for residual values.
maxLevel maximum quadtree level, or -1 to allow any level.
virtual proland::OrthoProducer::~OrthoProducer (  )  [virtual]

Deletes this OrthoProducer.

proland::OrthoProducer::OrthoProducer (  )  [protected]

Creates an uninitialized OrthoProducer.


Member Function Documentation

void proland::OrthoProducer::init ( ptr< ResourceManager >  manager,
Resource *  r,
const string &  name,
ptr< ResourceDescriptor >  desc,
const TiXmlElement *  e = NULL 
) [protected]

Initializes this OrthoProducer from a Resource.

Parameters:
manager the manager that will manage the created resource.
r the resource.
name the resource name.
desc the resource descriptor.
e an optional XML element providing contextual information (such as the XML element in which the resource descriptor was found).
void proland::OrthoProducer::init ( ptr< TileCache >  cache,
ptr< TileProducer >  residualTiles,
ptr< Texture2D >  orthoTexture,
ptr< Texture2D >  residualTexture,
ptr< Program >  upsample,
vec4f  rootNoiseColor,
vec4f  noiseColor,
vector< float > &  noiseAmp,
bool  noiseHsv,
float  scale,
int  maxLevel 
) [protected]

Initializes this OrthoProducer.

See OrthoProducer.


Member Data Documentation

The number of components per pixel in the CPU residual tiles.

Cube face ID for producers targeting spherical terrains.

Maximum quadtree level, or -1 to allow any level.

ptr<Texture2D> proland::OrthoProducer::orthoTexture [protected]

A texture used to produce the tiles.

Its size must be equal to the produced tile size (including borders).

ptr<Texture2D> proland::OrthoProducer::residualTexture [protected]

A texture used to produce the tiles.

Its size must be equal to the produced tile size (including borders).

ptr<TileProducer> proland::OrthoProducer::residualTiles [protected]

The producer producing the residual tiles.

This producer should produce its tiles in a CPUTileStorage of unsigned byte type. The size of the residual tiles (without borders) must be equal to the size of the produced tiles (without borders).

Scaling factor used for residual values.

ptr<Program> proland::OrthoProducer::upsample [protected]

The Program to perform the upsampling and add procedure on GPU.

See Ortho producer.


Generated on Sat May 12 09:42:13 2012 for proland by  doxygen 1.6.1