proland::OrthoCPUProducer Class Reference
[ortho]

A TileProducer to load any kind of texture tile from disk to CPU memory. More...

#include <OrthoCPUProducer.h>

List of all members.

Public Member Functions

 OrthoCPUProducer (ptr< TileCache > cache, const char *name)
 Creates a new OrthoCPUProducer.
virtual ~OrthoCPUProducer ()
 Deletes this OrthoCPUProducer.
bool isCompressed ()
 Returns true if the produced tiles are compressed in DXT format.

Protected Member Functions

 OrthoCPUProducer ()
 Creates an uninitialized OrthoCPUProducer.
virtual void init (ptr< TileCache > cache, const char *name)
 Initializes this OrthoCPUProducer.

Private Member Functions

int getTileId (int level, int tx, int ty)
 Returns the id of the given tile.

Private Attributes

string name
 The name of the file containing the residual tiles to load.
int channels
 The number of components per pixel in the tiles to load.
int tileSize
 The size of the tiles to load, without borders.
int border
 The size in pixels of the border around each tile.
int maxLevel
 The maximum level of the stored tiles on disk (inclusive).
bool dxt
 true if the produced tiles are compressed in DXT format.
int header
 Offset of the first stored tile on disk.
long long * offsets
 The offsets of each tile on disk, relatively to offset, for each tile id (see getTileId).
void * mutex
 A mutex used to serializes accesses to the file storing the tiles.
FILE * tileFile
 The file storing the tiles on disk.

Static Private Attributes

static void * key
 A key to store thread specific buffers used to produce the tiles.

Detailed Description

A TileProducer to load any kind of texture tile from disk to CPU memory.

See Ortho CPU producer.

Authors:
Eric Bruneton, Antoine Begault

Constructor & Destructor Documentation

proland::OrthoCPUProducer::OrthoCPUProducer ( ptr< TileCache >  cache,
const char *  name 
)

Creates a new OrthoCPUProducer.

Parameters:
cache the cache to store the produced tiles. The underlying storage must be a CPUTileStorage of unsigned char type. The size of tiles in this storage size must be equal to the size of the tiles stored on disk, borders included.
name the name of the file containing the tiles to load.
virtual proland::OrthoCPUProducer::~OrthoCPUProducer (  )  [virtual]

Deletes this OrthoCPUProducer.

proland::OrthoCPUProducer::OrthoCPUProducer (  )  [protected]

Creates an uninitialized OrthoCPUProducer.


Member Function Documentation

int proland::OrthoCPUProducer::getTileId ( int  level,
int  tx,
int  ty 
) [private]

Returns the id of the given tile.

This id is used to find the offset the tile data on disk, using offsets.

Parameters:
level the level of the tile.
tx the logical x coordinate of the tile.
ty the logical y coordinate of the tile.
Returns:
the id of the given tile.
virtual void proland::OrthoCPUProducer::init ( ptr< TileCache >  cache,
const char *  name 
) [protected, virtual]

Initializes this OrthoCPUProducer.

Parameters:
cache the cache to store the produced tiles. The underlying storage must be a CPUTileStorage of unsigned char type. The size of tiles in this storage size must be equal to the size of the tiles stored on disk, borders included.
name the name of the file containing the tiles to load.
bool proland::OrthoCPUProducer::isCompressed (  ) 

Returns true if the produced tiles are compressed in DXT format.


Member Data Documentation

The size in pixels of the border around each tile.

A tile contains (tileSize+4)*(tileSize+4)*channels samples.

The number of components per pixel in the tiles to load.

true if the produced tiles are compressed in DXT format.

Offset of the first stored tile on disk.

The offsets indicated in the tile offsets array offsets are relative to this offset.

void* proland::OrthoCPUProducer::key [static, private]

A key to store thread specific buffers used to produce the tiles.

The maximum level of the stored tiles on disk (inclusive).

A mutex used to serializes accesses to the file storing the tiles.

The name of the file containing the residual tiles to load.

long long* proland::OrthoCPUProducer::offsets [private]

The offsets of each tile on disk, relatively to offset, for each tile id (see getTileId).

The file storing the tiles on disk.

The size of the tiles to load, without borders.

A tile contains (tileSize+4)*(tileSize+4)*channels samples.


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