org.ogre4j
Interface ILight

All Superinterfaces:
IAllocatedObject<ISceneObjAllocPolicy>, IAnimableObject, IMovableObject, INativeObject, ISceneObjAllocatedObject, IShadowCaster
All Known Implementing Classes:
Light

public interface ILight
extends INativeObject, IMovableObject


Nested Class Summary
 
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
 
Method Summary
 void _calcTempSquareDist(IVector3 worldPos)
           
 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.
 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.
 void _notifyAttached(INode parent, boolean isTagPoint)
          Overridden from
 void _notifyIndexInFrame(int i)
           
 void _notifyMoved()
          Overridden from
 void _setCameraRelative(ICamera cam)
           
 void _updateRenderQueue(IRenderQueue queue)
          Overridden from
 void createAnimableValue(IAnimableValuePtr returnValue, java.lang.String valueName)
          Create a reference-counted AnimableValuePtr for the named value.
 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
 IShadowCameraSetupPtr getCustomShadowCameraSetup()
          return a pointer to the custom shadow camera setup (null means use global version).
 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.
 java.lang.String getMovableType()
          Overridden from
 IVector3 getPosition()
          Returns the position of the light.
 float getPowerScale()
          Set the scaling factor which indicates the relative power of a light.
 float getShadowFarDistance()
          Gets the maximum distance away from the camera that shadows by this light will be visible.
 float getShadowFarDistanceSquared()
           
 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 .
 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 setCustomShadowCameraSetup(IShadowCameraSetupPtr customShadowSetup)
          Set this light to use a custom shadow camera when rendering texture shadows.
 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 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 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 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 interface org.ogre4j.IMovableObject
_getCreator, _getLightList, _getManager, _getParentNodeFullTransform, _notifyCreator, _notifyCurrentCamera, _notifyManager, addQueryFlags, addVisibilityFlags, detatchFromParent, getCastShadows, getDarkCapBounds, getEdgeList, getLightCapBounds, getListener, getName, getParentNode, getParentSceneNode, getPointExtrusionDistance, getQueryFlags, getRenderingDistance, getRenderQueueGroup, getShadowVolumeRenderableIterator, getUserAny, getUserObject, getVisibilityFlags, getVisible, getWorldBoundingBox, getWorldBoundingSphere, hasEdgeList, isAttached, isDebugDisplayEnabled, isInScene, isVisible, queryLights, removeQueryFlags, removeVisibilityFlags, setCastShadows, setDebugDisplayEnabled, setListener, setQueryFlags, setRenderingDistance, setRenderQueueGroup, setUserAny, setUserObject, setVisibilityFlags
 
Methods inherited from interface org.ogre4j.IAnimableObject
getAnimableValueNames
 
Methods inherited from interface org.xbig.base.INativeObject
delete, disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Method Detail

_calcTempSquareDist

void _calcTempSquareDist(IVector3 worldPos)

setType

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


getType

Light.LightTypes getType()
Returns the light type.


setDiffuseColour

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


setDiffuseColour

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


getDiffuseColour

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


setSpecularColour

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


setSpecularColour

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


getSpecularColour

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


setAttenuation

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.


getAttenuationRange

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


getAttenuationConstant

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


getAttenuationLinear

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


getAttenuationQuadric

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


setPosition

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


setPosition

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


getPosition

IVector3 getPosition()
Returns the position of the light.


setDirection

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


setDirection

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


getDirection

IVector3 getDirection()
Returns the light's direction.


setSpotlightRange

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.


getSpotlightInnerAngle

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


getSpotlightOuterAngle

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


getSpotlightFalloff

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


setSpotlightInnerAngle

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


setSpotlightOuterAngle

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


setSpotlightFalloff

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


setPowerScale

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


getPowerScale

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


_notifyAttached

void _notifyAttached(INode parent,
                     boolean isTagPoint)
Overridden from

Specified by:
_notifyAttached in interface IMovableObject

_notifyMoved

void _notifyMoved()
Overridden from

Specified by:
_notifyMoved in interface IMovableObject

getBoundingBox

IAxisAlignedBox getBoundingBox()
Overridden from

Specified by:
getBoundingBox in interface IMovableObject

_updateRenderQueue

void _updateRenderQueue(IRenderQueue queue)
Overridden from

Specified by:
_updateRenderQueue in interface IMovableObject

getMovableType

java.lang.String getMovableType()
Overridden from

Specified by:
getMovableType in interface IMovableObject

getDerivedPosition

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


getDerivedDirection

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


setVisible

void setVisible(boolean visible)
Overridden from .

Specified by:
setVisible in interface IMovableObject

getBoundingRadius

float getBoundingRadius()
Overridden from

Specified by:
getBoundingRadius in interface IMovableObject

getAs4DVector

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


_getNearClipVolume

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.


_getFrustumClipVolumes

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.


getTypeFlags

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

Specified by:
getTypeFlags in interface IMovableObject

createAnimableValue

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

setCustomShadowCameraSetup

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


resetCustomShadowCameraSetup

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


getCustomShadowCameraSetup

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


visitRenderables

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 IMovableObject

_getIndexInFrame

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


_notifyIndexInFrame

void _notifyIndexInFrame(int i)

setShadowFarDistance

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


resetShadowFarDistance

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


getShadowFarDistance

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


getShadowFarDistanceSquared

float getShadowFarDistanceSquared()

_setCameraRelative

void _setCameraRelative(ICamera cam)

gettempSquareDist

float gettempSquareDist()

settempSquareDist

void settempSquareDist(float _jni_value_)


Copyright © 2007 netAllied GmbH. All Rights Reserved.