CrystalSpace

Public API Reference

iTerraSampler Struct Reference

TerraSampler objects are used for the actual queries of terrain data Sampler regions are requested from the iTerraFormer plugin, and sampled for data via the Sample methods. More...

#include <ivaria/terraform.h>

Inheritance diagram for iTerraSampler:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual void Cleanup ()=0
 Hint to the sampler that no data will be retrieved from it for a while.
virtual const csArray< iMaterialWrapper * > & GetMaterialPalette ()=0
 Retrieve the material palette used by this sampler region.
virtual const csBox2GetRegion () const =0
 Retrieve the sample region specified when the sampler was created.
virtual void GetResolution (uint &resx, uint &resz) const =0
 Retrieve both sampling resolutions specified when the sampler was created.
virtual unsigned int GetVersion () const =0
 Retrieve the version number of this sampler.
virtual const float * SampleFloat (csStringID type)=0
 Sample float data of the specified from the region.
virtual const int * SampleInteger (csStringID type)=0
 Sample integer data of the specified from the region.
virtual const csVector2SampleVector2 (csStringID type)=0
 Sample csVector2 data of the specified from the region.
virtual const csVector3SampleVector3 (csStringID type)=0
 Sample csVector3 data of the specified from the region.

Detailed Description

TerraSampler objects are used for the actual queries of terrain data Sampler regions are requested from the iTerraFormer plugin, and sampled for data via the Sample methods.

Definition at line 105 of file terraform.h.


Member Function Documentation

virtual void iTerraSampler::Cleanup (  )  [pure virtual]

Hint to the sampler that no data will be retrieved from it for a while.

This may give the sampler a chance to release data it's been caching for faster retrieval, and thereby save memory. This is a hint only, and may be ignored by the underlying implementation. Arrays returned by Sample calls are not guaranteed to be valid after Cleanup has been called, and must be considered invalid.

virtual const csArray<iMaterialWrapper*>& iTerraSampler::GetMaterialPalette (  )  [pure virtual]

Retrieve the material palette used by this sampler region.

Null entries are allowed.

virtual const csBox2& iTerraSampler::GetRegion (  )  const [pure virtual]

Retrieve the sample region specified when the sampler was created.

virtual void iTerraSampler::GetResolution ( uint resx,
uint resz 
) const [pure virtual]

Retrieve both sampling resolutions specified when the sampler was created.

virtual unsigned int iTerraSampler::GetVersion (  )  const [pure virtual]

Retrieve the version number of this sampler.

This will be increased whenever any terrain data in this region changes, and should thereby be used as a dirty indicator.

virtual const float* iTerraSampler::SampleFloat ( csStringID  type  )  [pure virtual]

Sample float data of the specified from the region.

Data is sampled in a grid (regular or irregular) with the square resolution specified when the sampler was created. The returned array is guaranteed to be valid until Cleanup is called.

virtual const int* iTerraSampler::SampleInteger ( csStringID  type  )  [pure virtual]

Sample integer data of the specified from the region.

Data is sampled in a grid (regular or irregular) with the square resolution specified when the sampler was created. The returned array is guaranteed to be valid until Cleanup is called.

virtual const csVector2* iTerraSampler::SampleVector2 ( csStringID  type  )  [pure virtual]

Sample csVector2 data of the specified from the region.

Data is sampled in a grid (regular or irregular) with the square resolution specified when the sampler was created. The returned array is guaranteed to be valid until Cleanup is called.

virtual const csVector3* iTerraSampler::SampleVector3 ( csStringID  type  )  [pure virtual]

Sample csVector3 data of the specified from the region.

Data is sampled in a grid (regular or irregular) with the square resolution specified when the sampler was created. The returned array is guaranteed to be valid until Cleanup is called.


The documentation for this struct was generated from the following file:
Generated for Crystal Space 1.0.2 by doxygen 1.4.7