CrystalSpace

Public API Reference

csCoverageTile Class Reference
[Geometry utilities]

Coverage tile. More...

#include <csgeom/tcovbuf.h>

List of all members.

Public Member Functions

void ClearOperations ()
 Clear all operations.
csPtr< iStringDebug_Dump ()
 Give a textual dump of this tile.
csPtr< iStringDebug_Dump_Cache ()
 Give a textual dump of the coverage cache.
bool Flush (csTileCol &fvalue, float maxdepth)
 Flush all operations in a tile given the fvalue from the previous tile and return the new fvalue (also in fvalue).
bool FlushForEmpty (csTileCol &fvalue, float maxdepth)
 Version of Flush that handles the case where the tile is empty.
void FlushForEmptyConstFValue (csTileCol &fvalue, float maxdepth)
 Version of Flush that handles the case where the tile is empty.
bool FlushForEmptyNoDepth (csTileCol &fvalue)
 Version of Flush that handles the case where the tile is empty.
bool FlushForFull (csTileCol &fvalue, float maxdepth)
 Version of Flush that handles the case where the tile is full.
void FlushForFullConstFValue (csTileCol &fvalue, float maxdepth)
 Version of Flush that handles the case where the tile is full.
bool FlushGeneral (csTileCol &fvalue, float maxdepth)
 General Flush (slowest version).
bool FlushGeneralConstFValue (csTileCol &fvalue, float maxdepth)
 General Flush (slowest version).
bool FlushIgnoreDepth (csTileCol &fvalue)
 Version of Flush that ignores depth.
bool FlushNoDepth (csTileCol &fvalue)
 Version of Flush that handles the case where there is no depth checking.
bool FlushNoDepthConstFValue (csTileCol &fvalue, float maxdepth)
 Version of Flush that handles the case where there is no depth checking.
void FlushOperations ()
 Flush all operations in a tile and render them on the coverage_cache.
void FlushOperationsOnlyFValue (csTileCol &fvalue)
 Flush all operations in a tile and only update the fvalue.
bool IsEmpty () const
 Return true if tile is surely empty.
bool IsFull () const
 Return true if tile is full.
void MakeEmpty ()
 Really make the tile empty (as opposed to just marking it as empty with queue_tile_empty).
void MakeEmptyQuick ()
 Faster version of MakeEmpty() that assumes that several of the fields will be correctly updated directly after calling this function.
void MarkEmpty ()
 Mark the tile as empty but don't perform any other cleaning operations.
void PerformOperations ()
 Perform all operations in a tile and render them on the coverage_cache.
void PerformOperationsOnlyFValue (csTileCol &fvalue)
 Perform all operations in a tile and only update the fvalue.
void PushFullVLine (int x)
 Add a full vertical line operation to the operations queue.
void PushLine (int x1, int y1, int x2, int y2, int dx)
 Add a general line operation to the operations queue.
void PushVLine (int x, int y1, int y2)
 Add a vertical line operation to the operations queue.
bool TestCoverageFlush (csTileCol &fvalue, float mindepth, bool &do_depth_test)
 Perform a non-modifying flush and return true if Flush would have affected the coverage buffer.
bool TestCoverageFlushForFull (csTileCol &fvalue, float mindepth, bool &do_depth_test)
 Version of TestFlush that handles the case where the tile is full.
bool TestCoverageFlushGeneral (csTileCol &fvalue, float maxdepth, bool &do_depth_test)
 General TestFlush version (least efficient).
bool TestCoverageRect (int start, int end, float testdepth, bool &do_depth_test)
 Test if a given rectangle is visible.
bool TestCoverageRect (const csTileCol &vermask, int start, int end, float testdepth, bool &do_depth_test)
 Test if a given rectangle is visible.
bool TestDepthFlush (csTileCol &fvalue, float mindepth)
 Perform a non-modifying flush and return true if Flush would have affected the coverage buffer.
bool TestDepthFlushGeneral (csTileCol &fvalue, float maxdepth)
 General TestFlush version (least efficient).
bool TestDepthRect (int start, int end, float testdepth)
 Test if a given rectangle is visible.
bool TestDepthRect (const csTileCol &vermask, int start, int end, float testdepth)
 Test if a given rectangle is visible.
bool TestFullRect (float testdepth)
 Test if a given rectangle with exactly the size of this tile (or bigger) is visible somewhere in this tile.
bool TestPoint (int x, int y, float testdepth)
 Test if a given point is visible in this tile.

Friends

class csTiledCoverageBuffer

Detailed Description

Coverage tile.

One tile is 32x64 or 64x32 pixels. Every tile is made from 4x8 or 8x4 blocks (so one block is 8x8 pixels).

Definition at line 125 of file tcovbuf.h.


Member Function Documentation

void csCoverageTile::ClearOperations (  )  [inline]

Clear all operations.

Definition at line 243 of file tcovbuf.h.

csPtr<iString> csCoverageTile::Debug_Dump (  ) 

Give a textual dump of this tile.

csPtr<iString> csCoverageTile::Debug_Dump_Cache (  ) 

Give a textual dump of the coverage cache.

bool csCoverageTile::Flush ( csTileCol &  fvalue,
float  maxdepth 
)

Flush all operations in a tile given the fvalue from the previous tile and return the new fvalue (also in fvalue).

This is the 1-bit implementation of Flush. A 3-bit implementation will come later. This function will correctly handle the case where the current tile is full. In that case only the fvalue will be updated. Returns true if the tile was modified.

bool csCoverageTile::FlushForEmpty ( csTileCol &  fvalue,
float  maxdepth 
)

Version of Flush that handles the case where the tile is empty.

Returns true if the tile was modified.

void csCoverageTile::FlushForEmptyConstFValue ( csTileCol &  fvalue,
float  maxdepth 
)

Version of Flush that handles the case where the tile is empty.

This version is for a constant fvalue for the entire tile.

bool csCoverageTile::FlushForEmptyNoDepth ( csTileCol &  fvalue  ) 

Version of Flush that handles the case where the tile is empty.

Returns true if the tile was modified. This version ignores depth.

bool csCoverageTile::FlushForFull ( csTileCol &  fvalue,
float  maxdepth 
)

Version of Flush that handles the case where the tile is full.

Returns true if the tile was modified.

void csCoverageTile::FlushForFullConstFValue ( csTileCol &  fvalue,
float  maxdepth 
)

Version of Flush that handles the case where the tile is full.

This version is for a constant fvalue for the entire tile.

bool csCoverageTile::FlushGeneral ( csTileCol &  fvalue,
float  maxdepth 
)

General Flush (slowest version).

Returns true if the tile was modified.

bool csCoverageTile::FlushGeneralConstFValue ( csTileCol &  fvalue,
float  maxdepth 
)

General Flush (slowest version).

This version is for a constant fvalue for the entire tile. Returns true if the tile was modified.

bool csCoverageTile::FlushIgnoreDepth ( csTileCol &  fvalue  ) 

Version of Flush that ignores depth.

bool csCoverageTile::FlushNoDepth ( csTileCol &  fvalue  ) 

Version of Flush that handles the case where there is no depth checking.

Returns true if the tile was modified.

bool csCoverageTile::FlushNoDepthConstFValue ( csTileCol &  fvalue,
float  maxdepth 
)

Version of Flush that handles the case where there is no depth checking.

This version is for a constant fvalue for the entire tile. Returns true if the tile was modified.

void csCoverageTile::FlushOperations (  ) 

Flush all operations in a tile and render them on the coverage_cache.

This is the same as PerformOperations() except that the operations are also cleared.

void csCoverageTile::FlushOperationsOnlyFValue ( csTileCol &  fvalue  ) 

Flush all operations in a tile and only update the fvalue.

This version can be used if you know the tile is full. This is the same as PerformOperationsOnlyFValue() except that the operations are also cleared.

bool csCoverageTile::IsEmpty (  )  const [inline]

Return true if tile is surely empty.

This can return false even if tile is empty. So don't 100% depend on this!

Definition at line 258 of file tcovbuf.h.

bool csCoverageTile::IsFull (  )  const [inline]

Return true if tile is full.

Definition at line 251 of file tcovbuf.h.

void csCoverageTile::MakeEmpty (  )  [inline]

Really make the tile empty (as opposed to just marking it as empty with queue_tile_empty).

Definition at line 216 of file tcovbuf.h.

void csCoverageTile::MakeEmptyQuick (  )  [inline]

Faster version of MakeEmpty() that assumes that several of the fields will be correctly updated directly after calling this function.

Don't call this unless you know what you are doing!

Definition at line 231 of file tcovbuf.h.

void csCoverageTile::MarkEmpty (  )  [inline]

Mark the tile as empty but don't perform any other cleaning operations.

MakeEmpty() will do that.

Definition at line 202 of file tcovbuf.h.

void csCoverageTile::PerformOperations (  ) 

Perform all operations in a tile and render them on the coverage_cache.

void csCoverageTile::PerformOperationsOnlyFValue ( csTileCol &  fvalue  ) 

Perform all operations in a tile and only update the fvalue.

This version can be used if you know the tile is full.

void csCoverageTile::PushFullVLine ( int  x  ) 

Add a full vertical line operation to the operations queue.

void csCoverageTile::PushLine ( int  x1,
int  y1,
int  x2,
int  y2,
int  dx 
)

Add a general line operation to the operations queue.

void csCoverageTile::PushVLine ( int  x,
int  y1,
int  y2 
)

Add a vertical line operation to the operations queue.

bool csCoverageTile::TestCoverageFlush ( csTileCol &  fvalue,
float  mindepth,
bool &  do_depth_test 
)

Perform a non-modifying flush and return true if Flush would have affected the coverage buffer.

bool csCoverageTile::TestCoverageFlushForFull ( csTileCol &  fvalue,
float  mindepth,
bool &  do_depth_test 
)

Version of TestFlush that handles the case where the tile is full.

bool csCoverageTile::TestCoverageFlushGeneral ( csTileCol &  fvalue,
float  maxdepth,
bool &  do_depth_test 
)

General TestFlush version (least efficient).

bool csCoverageTile::TestCoverageRect ( int  start,
int  end,
float  testdepth,
bool &  do_depth_test 
)

Test if a given rectangle is visible.

The rectangle is defined as a set of full vertical columns from 'start' to 'end'.

bool csCoverageTile::TestCoverageRect ( const csTileCol &  vermask,
int  start,
int  end,
float  testdepth,
bool &  do_depth_test 
)

Test if a given rectangle is visible.

The rectangle is defined as the vertical mask from 'start' to 'end' horizontally (inclusive range).

bool csCoverageTile::TestDepthFlush ( csTileCol &  fvalue,
float  mindepth 
)

Perform a non-modifying flush and return true if Flush would have affected the coverage buffer.

bool csCoverageTile::TestDepthFlushGeneral ( csTileCol &  fvalue,
float  maxdepth 
)

General TestFlush version (least efficient).

bool csCoverageTile::TestDepthRect ( const csTileCol &  vermask,
int  start,
int  end,
float  testdepth 
)

Test if a given rectangle is visible.

The rectangle is defined as the vertical mask from 'start' to 'end' horizontally (inclusive range).

bool csCoverageTile::TestDepthRect ( int  start,
int  end,
float  testdepth 
)

Test if a given rectangle is visible.

The rectangle is defined as a set of full vertical columns from 'start' to 'end'.

bool csCoverageTile::TestFullRect ( float  testdepth  ) 

Test if a given rectangle with exactly the size of this tile (or bigger) is visible somewhere in this tile.

If the tile is not full this is automatically the case. If the tile is full the given depth will be used. If the given depth is smaller or equal than the maximum depth in the depth buffer then rectangle is visible.

bool csCoverageTile::TestPoint ( int  x,
int  y,
float  testdepth 
)

Test if a given point is visible in this tile.

Coordinates are given relative to top-left coordinate of this tile.


The documentation for this class was generated from the following file:

Generated for Crystal Space 1.4.1 by doxygen 1.7.1