|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xbig.base.NativeObject
org.ogre4j.Light
public class Light
| 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 |
|---|
public Light(InstancePointer p)
protected Light(InstancePointer p,
boolean remote)
public Light(WithoutNativeObject val)
WithoutNativeObject,
INativeObject.disconnectFromNativeObject()public Light()
public Light(java.lang.String name)
| Method Detail |
|---|
public void delete()
INativeObjectSubclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!
delete in interface INativeObjectdelete in class NativeObject#remotepublic void finalize()
finalize in class NativeObjectpublic void _calcTempSquareDist(IVector3 worldPos)
_calcTempSquareDist in interface ILightpublic void setType(Light.LightTypes type)
setType in interface ILightpublic Light.LightTypes getType()
getType in interface ILight
public void setDiffuseColour(float red,
float green,
float blue)
setDiffuseColour in interface ILightpublic void setDiffuseColour(IColourValue colour)
setDiffuseColour in interface ILightpublic IColourValue getDiffuseColour()
getDiffuseColour in interface ILight
public void setSpecularColour(float red,
float green,
float blue)
setSpecularColour in interface ILightpublic void setSpecularColour(IColourValue colour)
setSpecularColour in interface ILightpublic IColourValue getSpecularColour()
getSpecularColour in interface ILight
public void setAttenuation(float range,
float constant,
float linear,
float quadratic)
setAttenuation in interface ILightpublic float getAttenuationRange()
getAttenuationRange in interface ILightpublic float getAttenuationConstant()
getAttenuationConstant in interface ILightpublic float getAttenuationLinear()
getAttenuationLinear in interface ILightpublic float getAttenuationQuadric()
getAttenuationQuadric in interface ILight
public void setPosition(float x,
float y,
float z)
setPosition in interface ILightpublic void setPosition(IVector3 vec)
setPosition in interface ILightpublic IVector3 getPosition()
getPosition in interface ILight
public void setDirection(float x,
float y,
float z)
setDirection in interface ILightpublic void setDirection(IVector3 vec)
setDirection in interface ILightpublic IVector3 getDirection()
getDirection in interface ILight
public void setSpotlightRange(IRadian innerAngle,
IRadian outerAngle,
float falloff)
setSpotlightRange in interface ILightpublic IRadian getSpotlightInnerAngle()
getSpotlightInnerAngle in interface ILightpublic IRadian getSpotlightOuterAngle()
getSpotlightOuterAngle in interface ILightpublic float getSpotlightFalloff()
getSpotlightFalloff in interface ILightpublic void setSpotlightInnerAngle(IRadian val)
setSpotlightInnerAngle in interface ILightpublic void setSpotlightOuterAngle(IRadian val)
setSpotlightOuterAngle in interface ILightpublic void setSpotlightFalloff(float val)
setSpotlightFalloff in interface ILightpublic void setPowerScale(float power)
setPowerScale in interface ILightpublic float getPowerScale()
getPowerScale in interface ILight
public void _notifyAttached(INode parent,
boolean isTagPoint)
_notifyAttached in interface ILight_notifyAttached in interface IMovableObjectpublic void _notifyMoved()
_notifyMoved in interface ILight_notifyMoved in interface IMovableObjectpublic IAxisAlignedBox getBoundingBox()
getBoundingBox in interface ILightgetBoundingBox in interface IMovableObjectpublic void _updateRenderQueue(IRenderQueue queue)
_updateRenderQueue in interface ILight_updateRenderQueue in interface IMovableObjectpublic java.lang.String getMovableType()
getMovableType in interface ILightgetMovableType in interface IMovableObjectpublic IVector3 getDerivedPosition(boolean cameraRelativeIfSet)
getDerivedPosition in interface ILightpublic IVector3 getDerivedDirection()
getDerivedDirection in interface ILightpublic void setVisible(boolean visible)
setVisible in interface ILightsetVisible in interface IMovableObjectpublic float getBoundingRadius()
getBoundingRadius in interface ILightgetBoundingRadius in interface IMovableObject
public void getAs4DVector(IVector4 returnValue,
boolean cameraRelativeIfSet)
getAs4DVector in interface ILightpublic IPlaneBoundedVolume _getNearClipVolume(ICamera cam)
_getNearClipVolume in interface ILightpublic IPlaneBoundedVolumeList _getFrustumClipVolumes(ICamera cam)
_getFrustumClipVolumes in interface ILightpublic long getTypeFlags()
IMovableObject
getTypeFlags in interface ILightgetTypeFlags in interface IMovableObject
public void createAnimableValue(IAnimableValuePtr returnValue,
java.lang.String valueName)
IAnimableObject
createAnimableValue in interface IAnimableObjectcreateAnimableValue in interface ILightpublic void setCustomShadowCameraSetup(IShadowCameraSetupPtr customShadowSetup)
setCustomShadowCameraSetup in interface ILightpublic void resetCustomShadowCameraSetup()
resetCustomShadowCameraSetup in interface ILightpublic IShadowCameraSetupPtr getCustomShadowCameraSetup()
getCustomShadowCameraSetup in interface ILight
public void visitRenderables(IRenderable.IVisitor visitor,
boolean debugRenderables)
IMovableObject
visitRenderables in interface ILightvisitRenderables in interface IMovableObjectpublic int _getIndexInFrame()
_getIndexInFrame in interface ILightpublic void _notifyIndexInFrame(int i)
_notifyIndexInFrame in interface ILightpublic void setShadowFarDistance(float distance)
setShadowFarDistance in interface ILightpublic void resetShadowFarDistance()
resetShadowFarDistance in interface ILightpublic float getShadowFarDistance()
getShadowFarDistance in interface ILightpublic float getShadowFarDistanceSquared()
getShadowFarDistanceSquared in interface ILightpublic void _setCameraRelative(ICamera cam)
_setCameraRelative in interface ILightpublic void _notifyCreator(IMovableObjectFactory fact)
_notifyCreator in interface IMovableObjectpublic IMovableObjectFactory _getCreator()
_getCreator in interface IMovableObjectpublic void _notifyManager(ISceneManager man)
_notifyManager in interface IMovableObjectpublic ISceneManager _getManager()
_getManager in interface IMovableObjectpublic java.lang.String getName()
getName in interface IMovableObjectpublic INode getParentNode()
getParentNode in interface IMovableObjectpublic ISceneNode getParentSceneNode()
getParentSceneNode in interface IMovableObjectpublic boolean isAttached()
isAttached in interface IMovableObjectpublic void detatchFromParent()
detatchFromParent in interface IMovableObjectpublic boolean isInScene()
isInScene in interface IMovableObjectpublic void _notifyCurrentCamera(ICamera cam)
_notifyCurrentCamera in interface IMovableObjectpublic IAxisAlignedBox getWorldBoundingBox(boolean derive)
getWorldBoundingBox in interface IMovableObjectgetWorldBoundingBox in interface IShadowCasterpublic ISphere getWorldBoundingSphere(boolean derive)
getWorldBoundingSphere in interface IMovableObjectpublic boolean getVisible()
getVisible in interface IMovableObjectpublic boolean isVisible()
isVisible in interface IMovableObjectpublic void setRenderingDistance(float dist)
setRenderingDistance in interface IMovableObjectpublic float getRenderingDistance()
getRenderingDistance in interface IMovableObjectpublic void setUserObject(IUserDefinedObject obj)
setUserObject in interface IMovableObjectpublic IUserDefinedObject getUserObject()
getUserObject in interface IMovableObjectpublic void setUserAny(IAny anything)
setUserAny in interface IMovableObjectpublic IAny getUserAny()
getUserAny in interface IMovableObjectpublic void setRenderQueueGroup(short queueID)
setRenderQueueGroup in interface IMovableObjectpublic short getRenderQueueGroup()
getRenderQueueGroup in interface IMovableObjectpublic IMatrix4 _getParentNodeFullTransform()
_getParentNodeFullTransform in interface IMovableObjectpublic void setQueryFlags(long flags)
setQueryFlags in interface IMovableObjectpublic void addQueryFlags(long flags)
addQueryFlags in interface IMovableObjectpublic void removeQueryFlags(long flags)
removeQueryFlags in interface IMovableObjectpublic long getQueryFlags()
getQueryFlags in interface IMovableObjectpublic void setVisibilityFlags(long flags)
setVisibilityFlags in interface IMovableObjectpublic void addVisibilityFlags(long flags)
addVisibilityFlags in interface IMovableObjectpublic void removeVisibilityFlags(long flags)
removeVisibilityFlags in interface IMovableObjectpublic long getVisibilityFlags()
getVisibilityFlags in interface IMovableObjectpublic void setListener(IMovableObject.IListener listener)
setListener in interface IMovableObjectpublic IMovableObject.IListener getListener()
getListener in interface IMovableObjectpublic ILightList queryLights()
queryLights in interface IMovableObjectpublic ILightList _getLightList()
_getLightList in interface IMovableObjectpublic IEdgeData getEdgeList()
IShadowCaster
getEdgeList in interface IMovableObjectgetEdgeList in interface IShadowCasterpublic boolean hasEdgeList()
IShadowCaster
hasEdgeList in interface IMovableObjecthasEdgeList in interface IShadowCaster
public void getShadowVolumeRenderableIterator(IShadowCaster.IShadowRenderableListIterator returnValue,
ShadowTechnique shadowTechnique,
ILight light,
IHardwareIndexBufferSharedPtr indexBuffer,
boolean extrudeVertices,
float extrusionDist,
long flags)
IShadowCaster
getShadowVolumeRenderableIterator in interface IMovableObjectgetShadowVolumeRenderableIterator in interface IShadowCasterpublic IAxisAlignedBox getLightCapBounds()
getLightCapBounds in interface IMovableObjectgetLightCapBounds in interface IShadowCaster
public IAxisAlignedBox getDarkCapBounds(ILight light,
float dirLightExtrusionDist)
getDarkCapBounds in interface IMovableObjectgetDarkCapBounds in interface IShadowCasterpublic void setCastShadows(boolean enabled)
setCastShadows in interface IMovableObjectpublic boolean getCastShadows()
getCastShadows in interface IMovableObjectgetCastShadows in interface IShadowCasterpublic float getPointExtrusionDistance(ILight l)
getPointExtrusionDistance in interface IMovableObjectgetPointExtrusionDistance in interface IShadowCasterpublic void setDebugDisplayEnabled(boolean enabled)
setDebugDisplayEnabled in interface IMovableObjectpublic boolean isDebugDisplayEnabled()
isDebugDisplayEnabled in interface IMovableObjectpublic static void setDefaultQueryFlags(long flags)
public static long getDefaultQueryFlags()
public static void setDefaultVisibilityFlags(long flags)
public static long getDefaultVisibilityFlags()
public static void extrudeVertices(IHardwareVertexBufferSharedPtr vertexBuffer,
int originalVertexCount,
IVector4 lightPos,
float extrudeDist)
public IStringVector getAnimableValueNames()
getAnimableValueNames in interface IAnimableObjectpublic float gettempSquareDist()
gettempSquareDist in interface ILightpublic void settempSquareDist(float _jni_value_)
settempSquareDist in interface ILight
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||