CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

csCoverageTile Class Reference

Coverage tile. More...

#include <csgeom/tcovbuf.h>

List of all members.

Public Member Functions

void MarkEmpty ()
 Mark the tile as empty but don't perform any other cleaning operations.
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 ClearOperations ()
 Clear all operations.
bool IsFull () const
 Return true if tile is full.
bool IsEmpty () const
 Return true if tile is surely empty.
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.
void PushFullVLine (int x)
 Add a full vertical line operation to the operations queue.
void PerformOperations ()
 Perform all operations in a tile and render them on the coverage_cache.
void FlushOperations ()
 Flush 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 FlushOperationsOnlyFValue (csTileCol &fvalue)
 Flush all operations in a tile and only update the fvalue.
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 FlushIgnoreDepth (csTileCol &fvalue)
 Version of Flush that ignores depth.
bool FlushForEmpty (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.
bool FlushNoDepth (csTileCol &fvalue)
 Version of Flush that handles the case where there is no depth checking.
bool FlushGeneral (csTileCol &fvalue, float maxdepth)
 General Flush (slowest version).
void FlushForEmptyConstFValue (csTileCol &fvalue, float maxdepth)
 Version of Flush that handles the case where the tile is empty.
void FlushForFullConstFValue (csTileCol &fvalue, float maxdepth)
 Version of Flush that handles the case where the tile is full.
bool FlushNoDepthConstFValue (csTileCol &fvalue, float maxdepth)
 Version of Flush that handles the case where there is no depth checking.
bool FlushGeneralConstFValue (csTileCol &fvalue, float maxdepth)
 General Flush (slowest version).
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 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 TestFullRect (float testdepth)
 Test if a given rectangle with exactly the size of this tile (or bigger) is visible somewhere in this tile.
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 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 TestPoint (int x, int y, float testdepth)
 Test if a given point is visible in this tile.
csPtr< iStringDebug_Dump ()
 Give a textual dump of this tile.
csPtr< iStringDebug_Dump_Cache ()
 Give a textual dump of the coverage cache.

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 106 of file tcovbuf.h.


Member Function Documentation

void csCoverageTile::ClearOperations  )  [inline]
 

Clear all operations.

Definition at line 224 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 239 of file tcovbuf.h.

bool csCoverageTile::IsFull  )  const [inline]
 

Return true if tile is full.

Definition at line 232 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 197 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 212 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 183 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 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::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::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 by doxygen 1.3.9.1