org.ogre4j
Class Light

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.Light
All Implemented Interfaces:
IAllocatedObject<ISceneObjAllocPolicy>, IAnimableObject, ILight, IMovableObject, ISceneObjAllocatedObject, IShadowCaster, INativeObject

public class Light
extends NativeObject
implements ILight


Nested Class Summary
static class Light.LightTypes
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IMovableObject
IMovableObject.IListener
 
Nested classes/interfaces inherited from interface org.ogre4j.IShadowCaster
IShadowCaster.IShadowRenderableList, IShadowCaster.IShadowRenderableListIterator
 
Nested classes/interfaces inherited from interface org.ogre4j.IAnimableObject
IAnimableObject.IAnimableDictionaryMap
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  Light()
          Default constructor (for Python mainly).
  Light(InstancePointer p)
          This constructor is public for internal useage only!
protected Light(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  Light(java.lang.String name)
          Normal constructor.
  Light(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void _calcTempSquareDist(IVector3 worldPos)
           
 IMovableObjectFactory _getCreator()
          Get the creator of this object, if any (internal use only)
 IPlaneBoundedVolumeList _getFrustumClipVolumes(ICamera cam)
          Internal method for calculating the clip volumes outside of the frustum which can be used to determine which objects are casting shadow on the frustum as a whole.
 int _getIndexInFrame()
          Gets the index at which this light is in the current render.
 ILightList _getLightList()
          Returns a pointer to the current list of lights for this object.
 ISceneManager _getManager()
          Get the manager of this object, if any (internal use only)
 IPlaneBoundedVolume _getNearClipVolume(ICamera cam)
          Internal method for calculating the 'near clip volume', which is the volume formed between the near clip rectangle of the camera and the light.
 IMatrix4 _getParentNodeFullTransform()
           
 void _notifyAttached(INode parent, boolean isTagPoint)
          Overridden from
 void _notifyCreator(IMovableObjectFactory fact)
          Notify the object of it's creator (internal use only)
 void _notifyCurrentCamera(ICamera cam)
          Internal method to notify the object of the camera to be used for the next rendering operation.
 void _notifyIndexInFrame(int i)
           
 void _notifyManager(ISceneManager man)
          Notify the object of it's manager (internal use only)
 void _notifyMoved()
          Overridden from
 void _setCameraRelative(ICamera cam)
           
 void _updateRenderQueue(IRenderQueue queue)
          Overridden from
 void addQueryFlags(long flags)
          As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this object.
 void addVisibilityFlags(long flags)
          As setVisibilityFlags, except the flags passed as parameters are appended to the existing flags on this object.
 void createAnimableValue(IAnimableValuePtr returnValue, java.lang.String valueName)
          Create a reference-counted AnimableValuePtr for the named value.
 void delete()
          Deletes the corresponding C++ object.
 void detatchFromParent()
          Detaches an object from a parent or , if attached.
static void extrudeVertices(IHardwareVertexBufferSharedPtr vertexBuffer, int originalVertexCount, IVector4 lightPos, float extrudeDist)
          Utility method for extruding vertices based on a light.
 void finalize()
           
 IStringVector getAnimableValueNames()
          Gets a list of animable value names for this object.
 void getAs4DVector(IVector4 returnValue, boolean cameraRelativeIfSet)
          Gets the details of this light as a 4D vector.
 float getAttenuationConstant()
          Returns the constant factor in the attenuation formula.
 float getAttenuationLinear()
          Returns the linear factor in the attenuation formula.
 float getAttenuationQuadric()
          Returns the quadric factor in the attenuation formula.
 float getAttenuationRange()
          Returns the absolute upper range of the light.
 IAxisAlignedBox getBoundingBox()
          Overridden from
 float getBoundingRadius()
          Overridden from
 boolean getCastShadows()
          Returns whether shadow casting is enabled for this object.
 IShadowCameraSetupPtr getCustomShadowCameraSetup()
          return a pointer to the custom shadow camera setup (null means use global version).
 IAxisAlignedBox getDarkCapBounds(ILight light, float dirLightExtrusionDist)
          Overridden member from .
static long getDefaultQueryFlags()
          Get the default query flags for all future instances.
static long getDefaultVisibilityFlags()
          Get the default visibility flags for all future instances.
 IVector3 getDerivedDirection()
          Retrieves the direction of the light including any transform from nodes it is attached to.
 IVector3 getDerivedPosition(boolean cameraRelativeIfSet)
          Retrieves the position of the light including any transform from nodes it is attached to.
 IColourValue getDiffuseColour()
          Returns the colour of the diffuse light given off by this light source (see setDiffuseColour for more info).
 IVector3 getDirection()
          Returns the light's direction.
 IEdgeData getEdgeList()
          Returns details of the edges which might be used to determine a silhouette.
 IAxisAlignedBox getLightCapBounds()
          Overridden member from .
 IMovableObject.IListener getListener()
          Gets the current listener for this object.
 java.lang.String getMovableType()
          Overridden from
 java.lang.String getName()
          Returns the name of this object.
 INode getParentNode()
          Returns the node to which this object is attached.
 ISceneNode getParentSceneNode()
          Returns the scene node to which this object is attached.
 float getPointExtrusionDistance(ILight l)
          Get the distance to extrude for a point/spot light
 IVector3 getPosition()
          Returns the position of the light.
 float getPowerScale()
          Set the scaling factor which indicates the relative power of a light.
 long getQueryFlags()
           
 float getRenderingDistance()
          Gets the distance at which batches are no longer rendered.
 short getRenderQueueGroup()
          Gets the queue group for this entity, see setRenderQueueGroup for full details.
 float getShadowFarDistance()
          Gets the maximum distance away from the camera that shadows by this light will be visible.
 float getShadowFarDistanceSquared()
           
 void getShadowVolumeRenderableIterator(IShadowCaster.IShadowRenderableListIterator returnValue, ShadowTechnique shadowTechnique, ILight light, IHardwareIndexBufferSharedPtr indexBuffer, boolean extrudeVertices, float extrusionDist, long flags)
          Gets an iterator over the renderables required to render the shadow volume.
 IColourValue getSpecularColour()
          Returns the colour of specular light given off by this light source.
 float getSpotlightFalloff()
          Returns the falloff between the inner and outer cones of the spotlight.
 IRadian getSpotlightInnerAngle()
          Returns the angle covered by the spotlights inner cone.
 IRadian getSpotlightOuterAngle()
          Returns the angle covered by the spotlights outer cone.
 float gettempSquareDist()
           
 Light.LightTypes getType()
          Returns the light type.
 long getTypeFlags()
          Get the 'type flags' for this .
 IAny getUserAny()
          Retrieves the custom user value associated with this object.
 IUserDefinedObject getUserObject()
          Retrieves a pointer to a custom application object associated with this movable by an earlier call to setUserObject.
 long getVisibilityFlags()
           
 boolean getVisible()
          Gets this object whether to be visible or not, if it has a renderable component.
 IAxisAlignedBox getWorldBoundingBox(boolean derive)
          Retrieves the axis-aligned bounding box for this object in world coordinates.
 ISphere getWorldBoundingSphere(boolean derive)
          Retrieves the worldspace bounding sphere for this object.
 boolean hasEdgeList()
          Returns whether the object has a valid edge list.
 boolean isAttached()
          Returns true if this object is attached to a or .
 boolean isDebugDisplayEnabled()
           
 boolean isInScene()
          Returns true if this object is attached to a or , and this / is currently in an active part of the scene graph.
 boolean isVisible()
          Returns whether or not this object is supposed to be visible or not.
 ILightList queryLights()
          Gets a list of lights, ordered relative to how close they are to this movable object.
 void removeQueryFlags(long flags)
          As setQueryFlags, except the flags passed as parameters are removed from the existing flags on this object.
 void removeVisibilityFlags(long flags)
          As setVisibilityFlags, except the flags passed as parameters are removed from the existing flags on this object.
 void resetCustomShadowCameraSetup()
          Reset the shadow camera setup to the default.
 void resetShadowFarDistance()
          Tells the light to use the shadow far distance of the
 void setAttenuation(float range, float constant, float linear, float quadratic)
          Sets the attenuation parameters of the light source i.e. how it diminishes with distance.
 void setCastShadows(boolean enabled)
          Sets whether or not this object will cast shadows.
 void setCustomShadowCameraSetup(IShadowCameraSetupPtr customShadowSetup)
          Set this light to use a custom shadow camera when rendering texture shadows.
 void setDebugDisplayEnabled(boolean enabled)
          Sets whether or not the debug display of this object is enabled.
static void setDefaultQueryFlags(long flags)
          Set the default query flags for all future instances.
static void setDefaultVisibilityFlags(long flags)
          Set the default visibility flags for all future instances.
 void setDiffuseColour(float red, float green, float blue)
          Sets the colour of the diffuse light given off by this source.
 void setDiffuseColour(IColourValue colour)
          Sets the colour of the diffuse light given off by this source.
 void setDirection(float x, float y, float z)
          Sets the direction in which a light points.
 void setDirection(IVector3 vec)
          Sets the direction in which a light points.
 void setListener(IMovableObject.IListener listener)
          Sets a listener for this object.
 void setPosition(float x, float y, float z)
          Sets the position of the light.
 void setPosition(IVector3 vec)
          Sets the position of the light.
 void setPowerScale(float power)
          Set a scaling factor to indicate the relative power of a light.
 void setQueryFlags(long flags)
          Sets the query flags for this object.
 void setRenderingDistance(float dist)
          Sets the distance at which the object is no longer rendered.
 void setRenderQueueGroup(short queueID)
          Sets the render queue group this entity will be rendered through.
 void setShadowFarDistance(float distance)
          Sets the maximum distance away from the camera that shadows by this light will be visible.
 void setSpecularColour(float red, float green, float blue)
          Sets the colour of the specular light given off by this source.
 void setSpecularColour(IColourValue colour)
          Sets the colour of the specular light given off by this source.
 void setSpotlightFalloff(float val)
          Sets the falloff between the inner and outer cones of the spotlight.
 void setSpotlightInnerAngle(IRadian val)
          Sets the angle covered by the spotlights inner cone.
 void setSpotlightOuterAngle(IRadian val)
          Sets the angle covered by the spotlights outer cone.
 void setSpotlightRange(IRadian innerAngle, IRadian outerAngle, float falloff)
          Sets the range of a spotlight, i.e. the angle of the inner and outer cones and the rate of falloff between them.
 void settempSquareDist(float _jni_value_)
           
 void setType(Light.LightTypes type)
          Sets the type of light - see LightTypes for more info.
 void setUserAny(IAny anything)
          Sets any kind of user value on this object.
 void setUserObject(IUserDefinedObject obj)
          Call this to associate your own custom user object instance with this .
 void setVisibilityFlags(long flags)
          Sets the visiblity flags for this object.
 void setVisible(boolean visible)
          Overridden from .
 void visitRenderables(IRenderable.IVisitor visitor, boolean debugRenderables)
          Method to allow a caller to abstractly iterate over the instances that this will add to the render queue when asked, if any.
 
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

Light

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


Light

protected Light(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.


Light

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

Light

public Light()
Default constructor (for Python mainly).


Light

public Light(java.lang.String name)
Normal constructor. Should not be called directly, but rather the method should be used.

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

_calcTempSquareDist

public void _calcTempSquareDist(IVector3 worldPos)
Specified by:
_calcTempSquareDist in interface ILight

setType

public void setType(Light.LightTypes type)
Sets the type of light - see LightTypes for more info.

Specified by:
setType in interface ILight

getType

public Light.LightTypes getType()
Returns the light type.

Specified by:
getType in interface ILight

setDiffuseColour

public void setDiffuseColour(float red,
                             float green,
                             float blue)
Sets the colour of the diffuse light given off by this source.

Specified by:
setDiffuseColour in interface ILight

setDiffuseColour

public void setDiffuseColour(IColourValue colour)
Sets the colour of the diffuse light given off by this source.

Specified by:
setDiffuseColour in interface ILight

getDiffuseColour

public IColourValue getDiffuseColour()
Returns the colour of the diffuse light given off by this light source (see setDiffuseColour for more info).

Specified by:
getDiffuseColour in interface ILight

setSpecularColour

public void setSpecularColour(float red,
                              float green,
                              float blue)
Sets the colour of the specular light given off by this source.

Specified by:
setSpecularColour in interface ILight

setSpecularColour

public void setSpecularColour(IColourValue colour)
Sets the colour of the specular light given off by this source.

Specified by:
setSpecularColour in interface ILight

getSpecularColour

public IColourValue getSpecularColour()
Returns the colour of specular light given off by this light source.

Specified by:
getSpecularColour in interface ILight

setAttenuation

public void setAttenuation(float range,
                           float constant,
                           float linear,
                           float quadratic)
Sets the attenuation parameters of the light source i.e. how it diminishes with distance.

Specified by:
setAttenuation in interface ILight

getAttenuationRange

public float getAttenuationRange()
Returns the absolute upper range of the light.

Specified by:
getAttenuationRange in interface ILight

getAttenuationConstant

public float getAttenuationConstant()
Returns the constant factor in the attenuation formula.

Specified by:
getAttenuationConstant in interface ILight

getAttenuationLinear

public float getAttenuationLinear()
Returns the linear factor in the attenuation formula.

Specified by:
getAttenuationLinear in interface ILight

getAttenuationQuadric

public float getAttenuationQuadric()
Returns the quadric factor in the attenuation formula.

Specified by:
getAttenuationQuadric in interface ILight

setPosition

public void setPosition(float x,
                        float y,
                        float z)
Sets the position of the light.

Specified by:
setPosition in interface ILight

setPosition

public void setPosition(IVector3 vec)
Sets the position of the light.

Specified by:
setPosition in interface ILight

getPosition

public IVector3 getPosition()
Returns the position of the light.

Specified by:
getPosition in interface ILight

setDirection

public void setDirection(float x,
                         float y,
                         float z)
Sets the direction in which a light points.

Specified by:
setDirection in interface ILight

setDirection

public void setDirection(IVector3 vec)
Sets the direction in which a light points.

Specified by:
setDirection in interface ILight

getDirection

public IVector3 getDirection()
Returns the light's direction.

Specified by:
getDirection in interface ILight

setSpotlightRange

public void setSpotlightRange(IRadian innerAngle,
                              IRadian outerAngle,
                              float falloff)
Sets the range of a spotlight, i.e. the angle of the inner and outer cones and the rate of falloff between them.

Specified by:
setSpotlightRange in interface ILight

getSpotlightInnerAngle

public IRadian getSpotlightInnerAngle()
Returns the angle covered by the spotlights inner cone.

Specified by:
getSpotlightInnerAngle in interface ILight

getSpotlightOuterAngle

public IRadian getSpotlightOuterAngle()
Returns the angle covered by the spotlights outer cone.

Specified by:
getSpotlightOuterAngle in interface ILight

getSpotlightFalloff

public float getSpotlightFalloff()
Returns the falloff between the inner and outer cones of the spotlight.

Specified by:
getSpotlightFalloff in interface ILight

setSpotlightInnerAngle

public void setSpotlightInnerAngle(IRadian val)
Sets the angle covered by the spotlights inner cone.

Specified by:
setSpotlightInnerAngle in interface ILight

setSpotlightOuterAngle

public void setSpotlightOuterAngle(IRadian val)
Sets the angle covered by the spotlights outer cone.

Specified by:
setSpotlightOuterAngle in interface ILight

setSpotlightFalloff

public void setSpotlightFalloff(float val)
Sets the falloff between the inner and outer cones of the spotlight.

Specified by:
setSpotlightFalloff in interface ILight

setPowerScale

public void setPowerScale(float power)
Set a scaling factor to indicate the relative power of a light.

Specified by:
setPowerScale in interface ILight

getPowerScale

public float getPowerScale()
Set the scaling factor which indicates the relative power of a light.

Specified by:
getPowerScale in interface ILight

_notifyAttached

public void _notifyAttached(INode parent,
                            boolean isTagPoint)
Overridden from

Specified by:
_notifyAttached in interface ILight
Specified by:
_notifyAttached in interface IMovableObject

_notifyMoved

public void _notifyMoved()
Overridden from

Specified by:
_notifyMoved in interface ILight
Specified by:
_notifyMoved in interface IMovableObject

getBoundingBox

public IAxisAlignedBox getBoundingBox()
Overridden from

Specified by:
getBoundingBox in interface ILight
Specified by:
getBoundingBox in interface IMovableObject

_updateRenderQueue

public void _updateRenderQueue(IRenderQueue queue)
Overridden from

Specified by:
_updateRenderQueue in interface ILight
Specified by:
_updateRenderQueue in interface IMovableObject

getMovableType

public java.lang.String getMovableType()
Overridden from

Specified by:
getMovableType in interface ILight
Specified by:
getMovableType in interface IMovableObject

getDerivedPosition

public IVector3 getDerivedPosition(boolean cameraRelativeIfSet)
Retrieves the position of the light including any transform from nodes it is attached to.

Specified by:
getDerivedPosition in interface ILight

getDerivedDirection

public IVector3 getDerivedDirection()
Retrieves the direction of the light including any transform from nodes it is attached to.

Specified by:
getDerivedDirection in interface ILight

setVisible

public void setVisible(boolean visible)
Overridden from .

Specified by:
setVisible in interface ILight
Specified by:
setVisible in interface IMovableObject

getBoundingRadius

public float getBoundingRadius()
Overridden from

Specified by:
getBoundingRadius in interface ILight
Specified by:
getBoundingRadius in interface IMovableObject

getAs4DVector

public void getAs4DVector(IVector4 returnValue,
                          boolean cameraRelativeIfSet)
Gets the details of this light as a 4D vector.

Specified by:
getAs4DVector in interface ILight

_getNearClipVolume

public IPlaneBoundedVolume _getNearClipVolume(ICamera cam)
Internal method for calculating the 'near clip volume', which is the volume formed between the near clip rectangle of the camera and the light.

Specified by:
_getNearClipVolume in interface ILight

_getFrustumClipVolumes

public IPlaneBoundedVolumeList _getFrustumClipVolumes(ICamera cam)
Internal method for calculating the clip volumes outside of the frustum which can be used to determine which objects are casting shadow on the frustum as a whole.

Specified by:
_getFrustumClipVolumes in interface ILight

getTypeFlags

public long getTypeFlags()
Description copied from interface: IMovableObject
Get the 'type flags' for this .

Specified by:
getTypeFlags in interface ILight
Specified by:
getTypeFlags in interface IMovableObject

createAnimableValue

public void createAnimableValue(IAnimableValuePtr returnValue,
                                java.lang.String valueName)
Description copied from interface: IAnimableObject
Create a reference-counted AnimableValuePtr for the named value.

Specified by:
createAnimableValue in interface IAnimableObject
Specified by:
createAnimableValue in interface ILight

setCustomShadowCameraSetup

public void setCustomShadowCameraSetup(IShadowCameraSetupPtr customShadowSetup)
Set this light to use a custom shadow camera when rendering texture shadows.

Specified by:
setCustomShadowCameraSetup in interface ILight

resetCustomShadowCameraSetup

public void resetCustomShadowCameraSetup()
Reset the shadow camera setup to the default.

Specified by:
resetCustomShadowCameraSetup in interface ILight

getCustomShadowCameraSetup

public IShadowCameraSetupPtr getCustomShadowCameraSetup()
return a pointer to the custom shadow camera setup (null means use global version).

Specified by:
getCustomShadowCameraSetup in interface ILight

visitRenderables

public void visitRenderables(IRenderable.IVisitor visitor,
                             boolean debugRenderables)
Description copied from interface: IMovableObject
Method to allow a caller to abstractly iterate over the instances that this will add to the render queue when asked, if any.

Specified by:
visitRenderables in interface ILight
Specified by:
visitRenderables in interface IMovableObject

_getIndexInFrame

public int _getIndexInFrame()
Gets the index at which this light is in the current render.

Specified by:
_getIndexInFrame in interface ILight

_notifyIndexInFrame

public void _notifyIndexInFrame(int i)
Specified by:
_notifyIndexInFrame in interface ILight

setShadowFarDistance

public void setShadowFarDistance(float distance)
Sets the maximum distance away from the camera that shadows by this light will be visible.

Specified by:
setShadowFarDistance in interface ILight

resetShadowFarDistance

public void resetShadowFarDistance()
Tells the light to use the shadow far distance of the

Specified by:
resetShadowFarDistance in interface ILight

getShadowFarDistance

public float getShadowFarDistance()
Gets the maximum distance away from the camera that shadows by this light will be visible.

Specified by:
getShadowFarDistance in interface ILight

getShadowFarDistanceSquared

public float getShadowFarDistanceSquared()
Specified by:
getShadowFarDistanceSquared in interface ILight

_setCameraRelative

public void _setCameraRelative(ICamera cam)
Specified by:
_setCameraRelative in interface ILight

_notifyCreator

public void _notifyCreator(IMovableObjectFactory fact)
Notify the object of it's creator (internal use only)

Specified by:
_notifyCreator in interface IMovableObject

_getCreator

public IMovableObjectFactory _getCreator()
Get the creator of this object, if any (internal use only)

Specified by:
_getCreator in interface IMovableObject

_notifyManager

public void _notifyManager(ISceneManager man)
Notify the object of it's manager (internal use only)

Specified by:
_notifyManager in interface IMovableObject

_getManager

public ISceneManager _getManager()
Get the manager of this object, if any (internal use only)

Specified by:
_getManager in interface IMovableObject

getName

public java.lang.String getName()
Returns the name of this object.

Specified by:
getName in interface IMovableObject

getParentNode

public INode getParentNode()
Returns the node to which this object is attached.

Specified by:
getParentNode in interface IMovableObject

getParentSceneNode

public ISceneNode getParentSceneNode()
Returns the scene node to which this object is attached.

Specified by:
getParentSceneNode in interface IMovableObject

isAttached

public boolean isAttached()
Returns true if this object is attached to a or .

Specified by:
isAttached in interface IMovableObject

detatchFromParent

public void detatchFromParent()
Detaches an object from a parent or , if attached.

Specified by:
detatchFromParent in interface IMovableObject

isInScene

public boolean isInScene()
Returns true if this object is attached to a or , and this / is currently in an active part of the scene graph.

Specified by:
isInScene in interface IMovableObject

_notifyCurrentCamera

public void _notifyCurrentCamera(ICamera cam)
Internal method to notify the object of the camera to be used for the next rendering operation.

Specified by:
_notifyCurrentCamera in interface IMovableObject

getWorldBoundingBox

public IAxisAlignedBox getWorldBoundingBox(boolean derive)
Retrieves the axis-aligned bounding box for this object in world coordinates.

Specified by:
getWorldBoundingBox in interface IMovableObject
Specified by:
getWorldBoundingBox in interface IShadowCaster

getWorldBoundingSphere

public ISphere getWorldBoundingSphere(boolean derive)
Retrieves the worldspace bounding sphere for this object.

Specified by:
getWorldBoundingSphere in interface IMovableObject

getVisible

public boolean getVisible()
Gets this object whether to be visible or not, if it has a renderable component.

Specified by:
getVisible in interface IMovableObject

isVisible

public boolean isVisible()
Returns whether or not this object is supposed to be visible or not.

Specified by:
isVisible in interface IMovableObject

setRenderingDistance

public void setRenderingDistance(float dist)
Sets the distance at which the object is no longer rendered.

Specified by:
setRenderingDistance in interface IMovableObject

getRenderingDistance

public float getRenderingDistance()
Gets the distance at which batches are no longer rendered.

Specified by:
getRenderingDistance in interface IMovableObject

setUserObject

public void setUserObject(IUserDefinedObject obj)
Call this to associate your own custom user object instance with this .

Specified by:
setUserObject in interface IMovableObject

getUserObject

public IUserDefinedObject getUserObject()
Retrieves a pointer to a custom application object associated with this movable by an earlier call to setUserObject.

Specified by:
getUserObject in interface IMovableObject

setUserAny

public void setUserAny(IAny anything)
Sets any kind of user value on this object.

Specified by:
setUserAny in interface IMovableObject

getUserAny

public IAny getUserAny()
Retrieves the custom user value associated with this object.

Specified by:
getUserAny in interface IMovableObject

setRenderQueueGroup

public void setRenderQueueGroup(short queueID)
Sets the render queue group this entity will be rendered through.

Specified by:
setRenderQueueGroup in interface IMovableObject

getRenderQueueGroup

public short getRenderQueueGroup()
Gets the queue group for this entity, see setRenderQueueGroup for full details.

Specified by:
getRenderQueueGroup in interface IMovableObject

_getParentNodeFullTransform

public IMatrix4 _getParentNodeFullTransform()
Specified by:
_getParentNodeFullTransform in interface IMovableObject

setQueryFlags

public void setQueryFlags(long flags)
Sets the query flags for this object.

Specified by:
setQueryFlags in interface IMovableObject

addQueryFlags

public void addQueryFlags(long flags)
As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this object.

Specified by:
addQueryFlags in interface IMovableObject

removeQueryFlags

public void removeQueryFlags(long flags)
As setQueryFlags, except the flags passed as parameters are removed from the existing flags on this object.

Specified by:
removeQueryFlags in interface IMovableObject

getQueryFlags

public long getQueryFlags()
Specified by:
getQueryFlags in interface IMovableObject

setVisibilityFlags

public void setVisibilityFlags(long flags)
Sets the visiblity flags for this object.

Specified by:
setVisibilityFlags in interface IMovableObject

addVisibilityFlags

public void addVisibilityFlags(long flags)
As setVisibilityFlags, except the flags passed as parameters are appended to the existing flags on this object.

Specified by:
addVisibilityFlags in interface IMovableObject

removeVisibilityFlags

public void removeVisibilityFlags(long flags)
As setVisibilityFlags, except the flags passed as parameters are removed from the existing flags on this object.

Specified by:
removeVisibilityFlags in interface IMovableObject

getVisibilityFlags

public long getVisibilityFlags()
Specified by:
getVisibilityFlags in interface IMovableObject

setListener

public void setListener(IMovableObject.IListener listener)
Sets a listener for this object.

Specified by:
setListener in interface IMovableObject

getListener

public IMovableObject.IListener getListener()
Gets the current listener for this object.

Specified by:
getListener in interface IMovableObject

queryLights

public ILightList queryLights()
Gets a list of lights, ordered relative to how close they are to this movable object.

Specified by:
queryLights in interface IMovableObject

_getLightList

public ILightList _getLightList()
Returns a pointer to the current list of lights for this object.

Specified by:
_getLightList in interface IMovableObject

getEdgeList

public IEdgeData getEdgeList()
Description copied from interface: IShadowCaster
Returns details of the edges which might be used to determine a silhouette.

Specified by:
getEdgeList in interface IMovableObject
Specified by:
getEdgeList in interface IShadowCaster

hasEdgeList

public boolean hasEdgeList()
Description copied from interface: IShadowCaster
Returns whether the object has a valid edge list.

Specified by:
hasEdgeList in interface IMovableObject
Specified by:
hasEdgeList in interface IShadowCaster

getShadowVolumeRenderableIterator

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

Specified by:
getShadowVolumeRenderableIterator in interface IMovableObject
Specified by:
getShadowVolumeRenderableIterator in interface IShadowCaster

getLightCapBounds

public IAxisAlignedBox getLightCapBounds()
Overridden member from .

Specified by:
getLightCapBounds in interface IMovableObject
Specified by:
getLightCapBounds in interface IShadowCaster

getDarkCapBounds

public IAxisAlignedBox getDarkCapBounds(ILight light,
                                        float dirLightExtrusionDist)
Overridden member from .

Specified by:
getDarkCapBounds in interface IMovableObject
Specified by:
getDarkCapBounds in interface IShadowCaster

setCastShadows

public void setCastShadows(boolean enabled)
Sets whether or not this object will cast shadows.

Specified by:
setCastShadows in interface IMovableObject

getCastShadows

public boolean getCastShadows()
Returns whether shadow casting is enabled for this object.

Specified by:
getCastShadows in interface IMovableObject
Specified by:
getCastShadows in interface IShadowCaster

getPointExtrusionDistance

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

Specified by:
getPointExtrusionDistance in interface IMovableObject
Specified by:
getPointExtrusionDistance in interface IShadowCaster

setDebugDisplayEnabled

public void setDebugDisplayEnabled(boolean enabled)
Sets whether or not the debug display of this object is enabled.

Specified by:
setDebugDisplayEnabled in interface IMovableObject

isDebugDisplayEnabled

public boolean isDebugDisplayEnabled()
Specified by:
isDebugDisplayEnabled in interface IMovableObject

setDefaultQueryFlags

public static void setDefaultQueryFlags(long flags)
Set the default query flags for all future instances.


getDefaultQueryFlags

public static long getDefaultQueryFlags()
Get the default query flags for all future instances.


setDefaultVisibilityFlags

public static void setDefaultVisibilityFlags(long flags)
Set the default visibility flags for all future instances.


getDefaultVisibilityFlags

public static long getDefaultVisibilityFlags()
Get the default visibility flags for all future instances.


extrudeVertices

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


getAnimableValueNames

public IStringVector getAnimableValueNames()
Gets a list of animable value names for this object.

Specified by:
getAnimableValueNames in interface IAnimableObject

gettempSquareDist

public float gettempSquareDist()
Specified by:
gettempSquareDist in interface ILight

settempSquareDist

public void settempSquareDist(float _jni_value_)
Specified by:
settempSquareDist in interface ILight


Copyright © 2007 netAllied GmbH. All Rights Reserved.