CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

csShadowBlock Class Reference

A single block of shadows. More...

#include <lview.h>

Inheritance diagram for csShadowBlock:

iShadowBlock iBase List of all members.

Public Methods

 csShadowBlock (uint32 region=(uint32)~0, int max_shadows=30, int delta=30)
 Create a new empty list. More...

virtual ~csShadowBlock ()
 Destroy the list and release all shadow references. More...

virtual void DeleteShadows ()
 Dereference all shadows in the list. More...

virtual const csBox3 & GetBoundingBox ()
 Get the bounding box of this shadow block. More...

void AddRelevantShadows (csShadowBlock *source, csTransform *trans=NULL)
 Copy all relevant shadow frustums from another shadow block into this block. More...

virtual void AddRelevantShadows (iShadowBlock *source, csTransform *trans=NULL)
 Copy all relevant shadow frustums from another shadow block into this block. More...

void AddRelevantShadows (csShadowBlockList *source)
 Copy all relevant shadow frustums from another shadow block list into this block. More...

virtual void AddRelevantShadows (iShadowBlockList *source)
 Copy all relevant shadow frustums from another shadow block list into this block. More...

void AddAllShadows (csShadowBlockList *source)
 Copy all shadow frustums from another shadow block list into this block. More...

virtual void AddAllShadows (iShadowBlockList *source)
 Copy all shadow frustums from another shadow block list into this block. More...

void AddUniqueRelevantShadows (csShadowBlockList *source)
 Add unique shadows. More...

virtual void AddUniqueRelevantShadows (iShadowBlockList *source)
 Add unique shadows. More...

virtual csFrustum * AddShadow (const csVector3 &origin, void *userData, int num_verts, csPlane3 &backplane)
 Add a new frustum and return a reference. More...

virtual void UnlinkShadow (int idx)
 Unlink a shadow frustum from the list and dereference it. More...

virtual int GetShadowCount ()
 Get the number of shadows in this list. More...

csFrustum * GetShadow (int idx)
 Get the specified shadow. More...

void Transform (csTransform *trans)
 Apply a transformation to all frustums in this list. More...

csShadowIterator * GetCsShadowIterator (bool reverse=false)
 Get iterator to iterate over all shadows in this block. More...

iShadowIterator * GetShadowIterator (bool reverse=false)
 Get iterator to iterate over all shadows in this block. More...

uint32 GetShadowRegion () const
 Get the region for this shadow block. More...


Friends

class csShadowBlockList
class csShadowIterator

Detailed Description

A single block of shadows.

This block will use IncRef()/DecRef() on the shadow frustums so that it is possible and legal to put a single shadow in several blocks.

Definition at line 133 of file lview.h.


Constructor & Destructor Documentation

csShadowBlock::csShadowBlock (  uint32    region = (uint32)~0,
int    max_shadows = 30,
int    delta = 30
) 
 

Create a new empty list.

virtual csShadowBlock::~csShadowBlock (    )  [virtual]
 

Destroy the list and release all shadow references.


Member Function Documentation

virtual void csShadowBlock::AddAllShadows (  iShadowBlockList *    source )  [virtual]
 

Copy all shadow frustums from another shadow block list into this block.

The frustums are not really copied but a new reference is kept.

Implements iShadowBlock.

void csShadowBlock::AddAllShadows (  csShadowBlockList *    source ) 
 

Copy all shadow frustums from another shadow block list into this block.

The frustums are not really copied but a new reference is kept.

virtual void csShadowBlock::AddRelevantShadows (  iShadowBlockList *    source )  [virtual]
 

Copy all relevant shadow frustums from another shadow block list into this block.

The frustums are not really copied but a new reference is kept.

Implements iShadowBlock.

void csShadowBlock::AddRelevantShadows (  csShadowBlockList *    source ) 
 

Copy all relevant shadow frustums from another shadow block list into this block.

The frustums are not really copied but a new reference is kept.

virtual void csShadowBlock::AddRelevantShadows (  iShadowBlock *    source,
csTransform *    trans = NULL
)  [virtual]
 

Copy all relevant shadow frustums from another shadow block into this block.

The frustums are not really copied but a new reference is kept. However, if a transformation is given then a copy is made and the shadows are transformed.

Implements iShadowBlock.

void csShadowBlock::AddRelevantShadows (  csShadowBlock *    source,
csTransform *    trans = NULL
) 
 

Copy all relevant shadow frustums from another shadow block into this block.

The frustums are not really copied but a new reference is kept. However, if a transformation is given then a copy is made and the shadows are transformed.

virtual csFrustum* csShadowBlock::AddShadow (  const csVector3 &    origin,
void *    userData,
int    num_verts,
csPlane3 &    backplane
)  [virtual]
 

Add a new frustum and return a reference.

The frustum will have the specified number of vertices but the vertices still need to be initialized.

Implements iShadowBlock.

virtual void csShadowBlock::AddUniqueRelevantShadows (  iShadowBlockList *    source )  [virtual]
 

Add unique shadows.

Only add relevant shadow frustums that are not already in the current list. The frustums are not really copied but a new reference is kept.

Implements iShadowBlock.

void csShadowBlock::AddUniqueRelevantShadows (  csShadowBlockList *    source ) 
 

Add unique shadows.

Only add relevant shadow frustums that are not already in the current list. The frustums are not really copied but a new reference is kept.

virtual void csShadowBlock::DeleteShadows (    )  [inline, virtual]
 

Dereference all shadows in the list.

Implements iShadowBlock.

Definition at line 156 of file lview.h.

References csRefArray::DeleteAll.

Referenced by csShadowBlockList::DeleteAllShadows.

virtual const csBox3& csShadowBlock::GetBoundingBox (    )  [virtual]
 

Get the bounding box of this shadow block.

Implements iShadowBlock.

csShadowIterator* csShadowBlock::GetCsShadowIterator (  bool    reverse = false )  [inline]
 

Get iterator to iterate over all shadows in this block.

Definition at line 263 of file lview.h.

csFrustum* csShadowBlock::GetShadow (  int    idx )  [inline, virtual]
 

Get the specified shadow.

Implements iShadowBlock.

Definition at line 242 of file lview.h.

References csRefArray::Length.

virtual int csShadowBlock::GetShadowCount (    )  [inline, virtual]
 

Get the number of shadows in this list.

Implements iShadowBlock.

Definition at line 236 of file lview.h.

References csRefArray::Length.

iShadowIterator* csShadowBlock::GetShadowIterator (  bool    reverse = false )  [inline, virtual]
 

Get iterator to iterate over all shadows in this block.

Implements iShadowBlock.

Definition at line 269 of file lview.h.

uint32 csShadowBlock::GetShadowRegion (    )  const [inline]
 

Get the region for this shadow block.

Definition at line 276 of file lview.h.

References uint32.

void csShadowBlock::Transform (  csTransform *    trans )  [inline, virtual]
 

Apply a transformation to all frustums in this list.

Implements iShadowBlock.

Definition at line 250 of file lview.h.

References csRefArray::Length, and csFrustum::Transform.

virtual void csShadowBlock::UnlinkShadow (  int    idx )  [virtual]
 

Unlink a shadow frustum from the list and dereference it.

Implements iShadowBlock.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14