TerrClipMapImageSource Class Reference

#include <terrClipMapImageSource.h>

Inheritance diagram for TerrClipMapImageSource:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 TerrClipMapImageSource (GBitmap *bmp, F32 offset)
virtual ~TerrClipMapImageSource ()
virtual const U32 getMipLevelCount () const
 Number of mip levels. Used to compensate for varied image source depths.
virtual void setInterestCenter (const Point2I &origin, const U32 radius)
 Set a new interest center for this image source.
virtual bool isDataAvailable (const U32 mipLevel, const RectI &region) const
 True if the data for the specified mip level and region is available.
virtual void copyBits (const U32 mipLevel, const ClipMap::ClipStackEntry *cse, const RectI &srcRegion, U8 *bits, const U32 pitch, const U32 expandonecomponent)
 Copy bits from source into a locked texture buffer.
virtual bool isTiling () const
 If true, this image source tiles itself infinitely; if the image source is tiling then the clipmap can also be tiling.
virtual F32 texelOffset () const
 This is used to deal with geometry that wants texels to be at vertices vs.

Public Attributes

GBitmapmBitmap

Private Attributes

F32 texOffset

Constructor & Destructor Documentation

TerrClipMapImageSource::TerrClipMapImageSource ( GBitmap bmp,
F32  offset 
)

virtual TerrClipMapImageSource::~TerrClipMapImageSource (  )  [virtual]


Member Function Documentation

virtual const U32 TerrClipMapImageSource::getMipLevelCount (  )  const [virtual]

Number of mip levels. Used to compensate for varied image source depths.

Implements IClipMapImageSource.

virtual void TerrClipMapImageSource::setInterestCenter ( const Point2I origin,
const U32  radius 
) [virtual]

Set a new interest center for this image source.

This gives the source important cues for paging of content.

Implements IClipMapImageSource.

virtual bool TerrClipMapImageSource::isDataAvailable ( const U32  mipLevel,
const RectI region 
) const [virtual]

True if the data for the specified mip level and region is available.

Implements IClipMapImageSource.

virtual void TerrClipMapImageSource::copyBits ( const U32  mipLevel,
const ClipMap::ClipStackEntry cse,
const RectI srcRegion,
U8 bits,
const U32  pitch,
const U32  expandonecomponent 
) [virtual]

Copy bits from source into a locked texture buffer.

Parameters:
mipLevel What mip level of the texture?
cse Information about the clip stack layer we're uploading to. Can be NULL.
srcRegion Region in pixels on this mip level to copy from.
bits Pointer to beginning of locked buffer.
pitch Stride in bytes from start of one row to start of next.

Implements IClipMapImageSource.

virtual bool TerrClipMapImageSource::isTiling (  )  const [virtual]

If true, this image source tiles itself infinitely; if the image source is tiling then the clipmap can also be tiling.

Specifically this means that the source can update a rectangle from any location in image-space as long as its extents are no bigger than the reported size of the image source.

Implements IClipMapImageSource.

virtual F32 TerrClipMapImageSource::texelOffset (  )  const [virtual]

This is used to deal with geometry that wants texels to be at vertices vs.

geometry that wants texels to be in the center of the quad/triangle. Return 0 for centering, and 0.5 for vertex based.

Implements IClipMapImageSource.


Member Data Documentation