AtlasClipMapImageSource Class Reference

#include <atlasClipMapImageSource.h>

Inheritance diagram for AtlasClipMapImageSource:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 AtlasClipMapImageSource ()
 ~AtlasClipMapImageSource ()
void setTOC (AtlasResourceTexTOC *toc)
void setUnique (bool unique)
bool isUnique ()
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.
S32 getChunkSize ()
virtual F32 texelOffset () const
 This is used to deal with geometry that wants texels to be at vertices vs.

Private Member Functions

void convertToTOCRect (const U32 mipLevel, const RectI &region, RectI &outStubs) const
 Given a texel region, convert to the TOC chunks that contain the specified data.

Private Attributes

AtlasInstanceTexTOCmTOC
Point2I mCacheOrigin
bool mUnique

Constructor & Destructor Documentation

AtlasClipMapImageSource::AtlasClipMapImageSource (  ) 

AtlasClipMapImageSource::~AtlasClipMapImageSource (  ) 


Member Function Documentation

void AtlasClipMapImageSource::convertToTOCRect ( const U32  mipLevel,
const RectI region,
RectI outStubs 
) const [inline, private]

Given a texel region, convert to the TOC chunks that contain the specified data.

void AtlasClipMapImageSource::setTOC ( AtlasResourceTexTOC toc  ) 

void AtlasClipMapImageSource::setUnique ( bool  unique  )  [inline]

bool AtlasClipMapImageSource::isUnique (  )  [inline]

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

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

Implements IClipMapImageSource.

virtual void AtlasClipMapImageSource::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 AtlasClipMapImageSource::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 AtlasClipMapImageSource::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 AtlasClipMapImageSource::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.

S32 AtlasClipMapImageSource::getChunkSize (  )  [inline]

virtual F32 AtlasClipMapImageSource::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