com.jme.light
Class LightNode
java.lang.Object
com.jme.scene.Spatial
com.jme.scene.Node
com.jme.light.LightNode
- All Implemented Interfaces:
- java.io.Serializable
- public class LightNode
- extends Node
LightNode defines a scene node that contains and maintains a
light object. A light node contains a single light, and positions the light
based on it's translation vector. If the contained light is a spot light, the
rotation of the node determines it's direction. If the contained light is a
Directional light rotation determines it's direction. It has no concept of
location.
- Version:
- $Id: LightNode.java,v 1.6 2004/12/09 17:45:46 mojomonkey Exp $
- Author:
- Mark Powell
- See Also:
- Serialized Form
| Fields inherited from class com.jme.scene.Spatial |
currentStates, defaultStateList, forceCull, forceView, frustrumIntersects, geometricalControllers, lightCombineMode, localRotation, localScale, localTranslation, name, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder |
|
Constructor Summary |
LightNode(java.lang.String name,
LightState lightState)
Constructor creates a new LightState object. |
|
Method Summary |
Light |
getLight()
getLight returns the light object this node is
controlling. |
void |
setLight(Light light)
setLight sets the light of this node. |
void |
setTarget(Spatial node)
setTarget defines the node (and it's children) that is
affected by this light. |
void |
updateWorldData(float time)
updateWorldData modifies the light data based on any
change the light node has made. |
| Methods inherited from class com.jme.scene.Node |
applyRenderState, attachChild, detachAllChildren, detachChild, detachChildAt, detachChildNamed, draw, drawBounds, findCollisions, findPick, getChild, getChild, getChildren, getQuantity, hasChild, hasCollision, putClone, setChild, setForceView, updateCollisionTree, updateWorldBound |
| Methods inherited from class com.jme.scene.Spatial |
addController, applyDefaultStates, calculateCollisions, calculatePick, clearCurrentState, clearCurrentStates, clearRenderState, getController, getControllers, getCurrentState, getLastFrustumIntersection, getLightCombineMode, getLocalRotation, getLocalScale, getLocalTranslation, getName, getParent, getRenderQueueMode, getRenderStateList, getTextureCombineMode, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, isForceCulled, isForceView, onDraw, onDrawBounds, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeFromParent, setForceCull, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setName, setParent, setRenderQueueMode, setRenderState, setTextureCombineMode, setWorldBound, setZOrder, toString, updateGeometricState, updateRenderState, updateRenderState |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LightNode
public LightNode(java.lang.String name,
LightState lightState)
- Constructor creates a new
LightState object. The light
state the node controls is required at construction time.
- Parameters:
name - the name of the scene element. This is required for
identification and comparision purposes.lightState - the lightstate that this node will control.
setLight
public void setLight(Light light)
setLight sets the light of this node. If a light was
previously set to the node, it is replaced by this light.
- Parameters:
light - the light to use for the node.
getLight
public Light getLight()
getLight returns the light object this node is
controlling.
- Returns:
- the light object of the node.
setTarget
public void setTarget(Spatial node)
setTarget defines the node (and it's children) that is
affected by this light.
- Parameters:
node - the node that is the target of the light.
updateWorldData
public void updateWorldData(float time)
updateWorldData modifies the light data based on any
change the light node has made.
- Overrides:
updateWorldData in class Node
- Parameters:
time - the time between frames.