crystalspace.jbind.impl.engine.shadows
Class csShadowBlockList

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.engine.shadows.csShadowBlockList
All Implemented Interfaces:
iBase, iPointer, iShadowBlockList

public class csShadowBlockList
extends csBase
implements iShadowBlockList

Author:
Quentin Anciaux

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csShadowBlockList(iPointer nPointer)
           
 
Method Summary
 void deleteAllShadows()
          Destroy all shadow lists and shadows in the list.
 boolean fromCurrentRegion(iShadowBlock block)
          Returns true if the shadow block belongs to the current region.
 iShadowBlock getFirstShadowBlock()
          Get first shadow block in the list.
 iShadowBlock getLastShadowBlock()
          Get last shadow block in the list.
 java.lang.String getName()
          Return the name of the interface
 iShadowBlock getNextShadowBlock(iShadowBlock s)
          Get next shadow block.
 iShadowBlock getPreviousShadowBlock(iShadowBlock s)
          Get previous shadow block.
 iShadowIterator getShadowIterator()
          Get an iterator to iterate over all shadows in this list.
 iShadowIterator getShadowIterator(boolean reverse)
          Get an iterator to iterate over all shadows in this list.
 iShadowIterator getShadowIterator(csBox3 bbox)
          Get an iterator to iterate over all shadows in this list.
 iShadowIterator getShadowIterator(csBox3 bbox, boolean reverse)
          Get an iterator to iterate over all shadows in this list.
 int getVersion()
          Return the version of the interface
protected  boolean isNativePointerValidSafe(long pointer)
           
 int markNewRegion()
          Mark a new region of shadow blocks.
 iShadowBlock newShadowBlock()
          Create a new shadow block and append to the list.
 iShadowBlock newShadowBlock(int num_shadows)
          Create a new shadow block and append to the list.
 void removeLastShadowBlock()
          Remove the last shadow block from this list.
 void restoreRegion(int prev)
          Restore a region (as parameter use the number returned by MarkNewRegion(););.
 
Methods inherited from class crystalspace.jbind.impl.csutil.scf.csBase
decRef, equals, finalize, getRefCount, incRef, nDelete, queryInterface, queryInterfaceSafe
 
Methods inherited from class crystalspace.jbind.impl.csNativeObject
changePointer, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, newNativeObject, setMemoryOwner, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getRefCount, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Constructor Detail

csShadowBlockList

public csShadowBlockList(iPointer nPointer)
Parameters:
nPointer -
Method Detail

getVersion

public int getVersion()
Description copied from interface: iBase
Return the version of the interface

Specified by:
getVersion in interface iBase
Specified by:
getVersion in class csBase
See Also:
iBase.getVersion()

getName

public java.lang.String getName()
Description copied from interface: iBase
Return the name of the interface

Specified by:
getName in interface iBase
Specified by:
getName in class csBase
See Also:
iBase.getName()

isNativePointerValidSafe

protected boolean isNativePointerValidSafe(long pointer)
Specified by:
isNativePointerValidSafe in class csNativeObject
See Also:
csNativeObject.isNativePointerValidSafe(long)

deleteAllShadows

public void deleteAllShadows()
Description copied from interface: iShadowBlockList
Destroy all shadow lists and shadows in the list.

Specified by:
deleteAllShadows in interface iShadowBlockList
See Also:
iShadowBlockList.deleteAllShadows()

fromCurrentRegion

public boolean fromCurrentRegion(iShadowBlock block)
Description copied from interface: iShadowBlockList
Returns true if the shadow block belongs to the current region.

Specified by:
fromCurrentRegion in interface iShadowBlockList
Parameters:
block -
Returns:
See Also:
iShadowBlockList.fromCurrentRegion(crystalspace.jbind.interfaces.iengine.shadows.iShadowBlock)

getFirstShadowBlock

public iShadowBlock getFirstShadowBlock()
Description copied from interface: iShadowBlockList
Get first shadow block in the list.

Specified by:
getFirstShadowBlock in interface iShadowBlockList
Returns:
See Also:
iShadowBlockList.getFirstShadowBlock()

getLastShadowBlock

public iShadowBlock getLastShadowBlock()
Description copied from interface: iShadowBlockList
Get last shadow block in the list.

Specified by:
getLastShadowBlock in interface iShadowBlockList
Returns:
See Also:
iShadowBlockList.getLastShadowBlock()

getNextShadowBlock

public iShadowBlock getNextShadowBlock(iShadowBlock s)
Description copied from interface: iShadowBlockList
Get next shadow block.

Specified by:
getNextShadowBlock in interface iShadowBlockList
Parameters:
s -
Returns:
See Also:
iShadowBlockList.getNextShadowBlock(crystalspace.jbind.interfaces.iengine.shadows.iShadowBlock)

getPreviousShadowBlock

public iShadowBlock getPreviousShadowBlock(iShadowBlock s)
Description copied from interface: iShadowBlockList
Get previous shadow block.

Specified by:
getPreviousShadowBlock in interface iShadowBlockList
Parameters:
s -
Returns:
See Also:
iShadowBlockList.getPreviousShadowBlock(crystalspace.jbind.interfaces.iengine.shadows.iShadowBlock)

getShadowIterator

public iShadowIterator getShadowIterator(csBox3 bbox)
Description copied from interface: iShadowBlockList
Get an iterator to iterate over all shadows in this list. This version will test the bounding boxes of all shadow blocks and only iterate over the shadow blocks that are potentially relevant (i.e. that potentially shadow the given bounding box).

Specified by:
getShadowIterator in interface iShadowBlockList
Parameters:
bbox -
Returns:
See Also:
iShadowBlockList.getShadowIterator(crystalspace.jbind.impl.csgeom.box.csBox3)

getShadowIterator

public iShadowIterator getShadowIterator(csBox3 bbox,
                                         boolean reverse)
Description copied from interface: iShadowBlockList
Get an iterator to iterate over all shadows in this list. This version will test the bounding boxes of all shadow blocks and only iterate over the shadow blocks that are potentially relevant (i.e. that potentially shadow the given bounding box).

Specified by:
getShadowIterator in interface iShadowBlockList
Parameters:
bbox -
reverse -
Returns:
See Also:
iShadowBlockList.getShadowIterator(crystalspace.jbind.impl.csgeom.box.csBox3, boolean)

getShadowIterator

public iShadowIterator getShadowIterator()
Description copied from interface: iShadowBlockList
Get an iterator to iterate over all shadows in this list.

Specified by:
getShadowIterator in interface iShadowBlockList
Returns:
See Also:
iShadowBlockList.getShadowIterator()

getShadowIterator

public iShadowIterator getShadowIterator(boolean reverse)
Description copied from interface: iShadowBlockList
Get an iterator to iterate over all shadows in this list.

Specified by:
getShadowIterator in interface iShadowBlockList
Parameters:
reverse -
Returns:
See Also:
iShadowBlockList.getShadowIterator(boolean)

markNewRegion

public int markNewRegion()
Description copied from interface: iShadowBlockList
Mark a new region of shadow blocks. This is usually called after entering a portal and it allows us to easily restore the shadow list upto the point of the last portal traversal. Returns the original region.

Specified by:
markNewRegion in interface iShadowBlockList
Returns:
See Also:
iShadowBlockList.markNewRegion()

newShadowBlock

public iShadowBlock newShadowBlock()
Description copied from interface: iShadowBlockList
Create a new shadow block and append to the list.

Specified by:
newShadowBlock in interface iShadowBlockList
Returns:
See Also:
iShadowBlockList.newShadowBlock()

newShadowBlock

public iShadowBlock newShadowBlock(int num_shadows)
Description copied from interface: iShadowBlockList
Create a new shadow block and append to the list.

Specified by:
newShadowBlock in interface iShadowBlockList
Parameters:
num_shadows -
Returns:
See Also:
iShadowBlockList.newShadowBlock(int)

removeLastShadowBlock

public void removeLastShadowBlock()
Description copied from interface: iShadowBlockList
Remove the last shadow block from this list.

Specified by:
removeLastShadowBlock in interface iShadowBlockList
See Also:
iShadowBlockList.removeLastShadowBlock()

restoreRegion

public void restoreRegion(int prev)
Description copied from interface: iShadowBlockList
Restore a region (as parameter use the number returned by MarkNewRegion(););.

Specified by:
restoreRegion in interface iShadowBlockList
Parameters:
prev -
See Also:
iShadowBlockList.restoreRegion(int)