org.ogre4j
Class ShadowCaster

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.ShadowCaster
All Implemented Interfaces:
IShadowCaster, INativeObject

public class ShadowCaster
extends NativeObject
implements IShadowCaster


Nested Class Summary
static class ShadowCaster.ShadowRenderableList
           
static class ShadowCaster.ShadowRenderableListIterator
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IShadowCaster
IShadowCaster.IShadowRenderableList, IShadowCaster.IShadowRenderableListIterator
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  ShadowCaster(InstancePointer p)
          This constructor is public for internal useage only!
protected ShadowCaster(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  ShadowCaster(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void delete()
          Deletes the corresponding C++ object.
static void extrudeVertices(IHardwareVertexBufferSharedPtr vertexBuffer, int originalVertexCount, IVector4 lightPos, float extrudeDist)
          Utility method for extruding vertices based on a light.
 void finalize()
           
 boolean getCastShadows()
          Returns whether or not this object currently casts a shadow.
 IAxisAlignedBox getDarkCapBounds(ILight light, float dirLightExtrusionDist)
          Gets the world space bounding box of the dark cap, as extruded using the light provided
 IEdgeData getEdgeList()
          Returns details of the edges which might be used to determine a silhouette.
 IAxisAlignedBox getLightCapBounds()
          Gets the world space bounding box of the light cap
 float getPointExtrusionDistance(ILight l)
          Get the distance to extrude for a point/spot light
 void getShadowVolumeRenderableIterator(IShadowCaster.IShadowRenderableListIterator returnValue, ShadowTechnique shadowTechnique, ILight light, IHardwareIndexBufferSharedPtr indexBuffer, boolean extrudeVertices, float extrusionDistance, long flags)
          Gets an iterator over the renderables required to render the shadow volume.
 IAxisAlignedBox getWorldBoundingBox(boolean derive)
          Get the world bounding box of the caster.
 boolean hasEdgeList()
          Returns whether the object has a valid edge list.
 
Methods inherited from class org.xbig.base.NativeObject
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xbig.base.INativeObject
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Constructor Detail

ShadowCaster

public ShadowCaster(InstancePointer p)
This constructor is public for internal useage only! Do not use it!


ShadowCaster

protected ShadowCaster(InstancePointer p,
                       boolean remote)
Creates a Java wrapper object for an existing C++ object. If remote is set to 'true' this object cannot be deleted in Java.


ShadowCaster

public ShadowCaster(WithoutNativeObject val)
Allows creation of Java objects without C++ objects.

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()
Method Detail

delete

public void delete()
Description copied from interface: INativeObject
Deletes the corresponding C++ object.

Subclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!

Specified by:
delete in interface INativeObject
Specified by:
delete in class NativeObject
See Also:
#remote

finalize

public void finalize()
Overrides:
finalize in class NativeObject

getCastShadows

public boolean getCastShadows()
Returns whether or not this object currently casts a shadow.

Specified by:
getCastShadows in interface IShadowCaster

getEdgeList

public IEdgeData getEdgeList()
Returns details of the edges which might be used to determine a silhouette.

Specified by:
getEdgeList in interface IShadowCaster

hasEdgeList

public boolean hasEdgeList()
Returns whether the object has a valid edge list.

Specified by:
hasEdgeList in interface IShadowCaster

getWorldBoundingBox

public IAxisAlignedBox getWorldBoundingBox(boolean derive)
Get the world bounding box of the caster.

Specified by:
getWorldBoundingBox in interface IShadowCaster

getLightCapBounds

public IAxisAlignedBox getLightCapBounds()
Gets the world space bounding box of the light cap

Specified by:
getLightCapBounds in interface IShadowCaster

getDarkCapBounds

public IAxisAlignedBox getDarkCapBounds(ILight light,
                                        float dirLightExtrusionDist)
Gets the world space bounding box of the dark cap, as extruded using the light provided

Specified by:
getDarkCapBounds in interface IShadowCaster

getShadowVolumeRenderableIterator

public void getShadowVolumeRenderableIterator(IShadowCaster.IShadowRenderableListIterator returnValue,
                                              ShadowTechnique shadowTechnique,
                                              ILight light,
                                              IHardwareIndexBufferSharedPtr indexBuffer,
                                              boolean extrudeVertices,
                                              float extrusionDistance,
                                              long flags)
Gets an iterator over the renderables required to render the shadow volume.

Specified by:
getShadowVolumeRenderableIterator in interface IShadowCaster

getPointExtrusionDistance

public float getPointExtrusionDistance(ILight l)
Get the distance to extrude for a point/spot light

Specified by:
getPointExtrusionDistance in interface IShadowCaster

extrudeVertices

public static void extrudeVertices(IHardwareVertexBufferSharedPtr vertexBuffer,
                                   int originalVertexCount,
                                   IVector4 lightPos,
                                   float extrudeDist)
Utility method for extruding vertices based on a light.



Copyright © 2007 netAllied GmbH. All Rights Reserved.