crystalspace.jbind.impl.engine.shadows
Class csShadowBlock

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

public class csShadowBlock
extends csBase
implements iShadowBlock

Author:
Quentin Anciaux

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csShadowBlock(iPointer nPointer)
           
 
Method Summary
 void addAllShadows(iShadowBlockList source)
          Copy all shadow frustums from another shadow block list into this block.
 void addRelevantShadows(iShadowBlock source)
          Copy all relevant shadow frustums from another shadow block into this block.
 void addRelevantShadows(iShadowBlock source, csTransform trans)
          Copy all relevant shadow frustums from another shadow block into this block.
 void addRelevantShadows(iShadowBlockList source)
          Copy all relevant shadow frustums from another shadow block list into this block.
 csFrustum addShadow(csVector3 origin, iPointer userData, int num_verts, csPlane3 backplane)
          Add a new frustum and return a reference.
 void addUniqueRelevantShadows(iShadowBlockList source)
          Add unique shadows.
 void deleteShadows()
          Dereference all shadows in the list.
 csBox3 getBoundingBox()
          Get the bounding box of this shadow block.
 java.lang.String getName()
          Return the name of the interface
 csFrustum getShadow(int idx)
          Get the specified shadow.
 int getShadowCount()
          Get the number of shadows in this list.
 iShadowIterator getShadowIterator()
          Get an iterator to iterate over all shadows in this block.
 iShadowIterator getShadowIterator(boolean reverse)
          Get an iterator to iterate over all shadows in this block.
 int getVersion()
          Return the version of the interface
protected  boolean isNativePointerValidSafe(long pointer)
           
 void transform(csTransform trans)
          Apply a transformation to all frustums in this list.
 void unlinkShadow(int idx)
          Unlink a shadow frustum from the list and dereference it.
 
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

csShadowBlock

public csShadowBlock(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)

addAllShadows

public void addAllShadows(iShadowBlockList source)
Description copied from interface: iShadowBlock
Copy all shadow frustums from another shadow block list into this block. The frustums are not really copied but a new reference is kept. Implemented in csShadowBlock.

Specified by:
addAllShadows in interface iShadowBlock
Parameters:
source -
See Also:
iShadowBlock.addAllShadows(crystalspace.jbind.interfaces.iengine.shadows.iShadowBlockList)

addRelevantShadows

public void addRelevantShadows(iShadowBlockList source)
Description copied from interface: iShadowBlock
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. Implemented in csShadowBlock.

Specified by:
addRelevantShadows in interface iShadowBlock
Parameters:
source -
See Also:
iShadowBlock.addRelevantShadows(crystalspace.jbind.interfaces.iengine.shadows.iShadowBlockList)

addRelevantShadows

public void addRelevantShadows(iShadowBlock source)
Description copied from interface: iShadowBlock
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. Implemented in csShadowBlock.

Specified by:
addRelevantShadows in interface iShadowBlock
Parameters:
source -
See Also:
iShadowBlock.addRelevantShadows(crystalspace.jbind.interfaces.iengine.shadows.iShadowBlock)

addRelevantShadows

public void addRelevantShadows(iShadowBlock source,
                               csTransform trans)
Description copied from interface: iShadowBlock
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. Implemented in csShadowBlock.

Specified by:
addRelevantShadows in interface iShadowBlock
Parameters:
source -
trans -
See Also:
iShadowBlock.addRelevantShadows(crystalspace.jbind.interfaces.iengine.shadows.iShadowBlock, crystalspace.jbind.impl.csgeom.transfrm.csTransform)

addShadow

public csFrustum addShadow(csVector3 origin,
                           iPointer userData,
                           int num_verts,
                           csPlane3 backplane)
Description copied from interface: iShadowBlock
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. Implemented in csShadowBlock.

Specified by:
addShadow in interface iShadowBlock
Parameters:
origin -
userData -
num_verts -
backplane -
Returns:
See Also:
iShadowBlock.addShadow(crystalspace.jbind.impl.csgeom.vector3.csVector3, crystalspace.jbind.interfaces.iPointer, int, crystalspace.jbind.impl.csgeom.plane3.csPlane3)

addUniqueRelevantShadows

public void addUniqueRelevantShadows(iShadowBlockList source)
Description copied from interface: iShadowBlock
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. Implemented in csShadowBlock.

Specified by:
addUniqueRelevantShadows in interface iShadowBlock
Parameters:
source -
See Also:
iShadowBlock.addUniqueRelevantShadows(crystalspace.jbind.interfaces.iengine.shadows.iShadowBlockList)

deleteShadows

public void deleteShadows()
Description copied from interface: iShadowBlock
Dereference all shadows in the list. Implemented in csShadowBlock.

Specified by:
deleteShadows in interface iShadowBlock
See Also:
iShadowBlock.deleteShadows()

getBoundingBox

public csBox3 getBoundingBox()
Description copied from interface: iShadowBlock
Get the bounding box of this shadow block. Implemented in csShadowBlock.

Specified by:
getBoundingBox in interface iShadowBlock
Returns:
See Also:
iShadowBlock.getBoundingBox()

getShadow

public csFrustum getShadow(int idx)
Description copied from interface: iShadowBlock
Get the specified shadow. Implemented in csShadowBlock.

Specified by:
getShadow in interface iShadowBlock
Parameters:
idx -
Returns:
See Also:
iShadowBlock.getShadow(int)

getShadowCount

public int getShadowCount()
Description copied from interface: iShadowBlock
Get the number of shadows in this list. Implemented in csShadowBlock.

Specified by:
getShadowCount in interface iShadowBlock
Returns:
See Also:
iShadowBlock.getShadowCount()

getShadowIterator

public iShadowIterator getShadowIterator()
Description copied from interface: iShadowBlock
Get an iterator to iterate over all shadows in this block. Implemented in csShadowBlock.

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

getShadowIterator

public iShadowIterator getShadowIterator(boolean reverse)
Description copied from interface: iShadowBlock
Get an iterator to iterate over all shadows in this block. Implemented in csShadowBlock.

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

transform

public void transform(csTransform trans)
Description copied from interface: iShadowBlock
Apply a transformation to all frustums in this list. Implemented in csShadowBlock.

Specified by:
transform in interface iShadowBlock
Parameters:
trans -
See Also:
iShadowBlock.transform(crystalspace.jbind.impl.csgeom.transfrm.csTransform)

unlinkShadow

public void unlinkShadow(int idx)
Description copied from interface: iShadowBlock
Unlink a shadow frustum from the list and dereference it. Implemented in csShadowBlock

Specified by:
unlinkShadow in interface iShadowBlock
Parameters:
idx -
See Also:
iShadowBlock.unlinkShadow(int)