de.esw.eengine.renderable
Class SceneNode
java.lang.Object
de.esw.eengine.renderable.AbstractRenderable
de.esw.eengine.renderable.HierarchyNode
de.esw.eengine.renderable.SceneNode
- All Implemented Interfaces:
- IActivatable, IRenderable, IScriptable<HierarchyNode>, IUpdateable
public class SceneNode
- extends HierarchyNode
- Since:
- 1.0
- Version:
- $Id: SceneNode.java 209 2005-07-23 00:39:50Z markusw $
- Author:
- markusw
| Methods inherited from class de.esw.eengine.renderable.HierarchyNode |
addScript, getBoundingVolume, getHeight, getScaleX, getScaleY, getScriptByName, getScripts, getVx, getVy, getWidth, getX, getY, isActive, move, printHierarchy, removeScript, scale, setActive, setBoundingVolume, setLocation, setScale, setScaleY, setVelocity, setVx, setVy, setX, setY, toggle |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SceneNode
public SceneNode()
SceneNode
public SceneNode(java.lang.String name)
- Creates a
SceneNode without parent node
- Parameters:
name - Name for this node
SceneNode
public SceneNode(java.lang.String name,
SceneNode parent)
- Parameters:
name - Name for this nodeparent - Parent SceneNode of this node
SceneNode
public SceneNode(java.lang.String name,
SceneNode parent,
SceneEntity entity,
int x,
int y)
- Create a new
SceneNode
- Parameters:
name - Name for this nodeparent - Parent SceneNode of this nodeentity - ISceneEntity attached to this nodex - X location of this SceneNodey - Y location of this SceneNode
render
public void render(IRenderDevice renderDevice)
- Description copied from interface:
IRenderable
- Renders this entity to the current
IRenderDevice
- Parameters:
renderDevice - IRenderDevice to render onto- See Also:
IRenderable.render(de.esw.eengine.core.IRenderDevice)
update
public void update(float delta)
- Specified by:
update in interface IUpdateable- Overrides:
update in class HierarchyNode
- Parameters:
delta - Time in millis since last update- See Also:
IUpdateable.update(float)
getParent
public final SceneNode getParent()
- Returns:
- Returns the parent.
setParent
public final void setParent(SceneNode parent)
- Parameters:
parent - The parent to set.
getEntity
public final SceneEntity getEntity()
- Returns:
- Attached
SceneEntity
setEntity
public final void setEntity(SceneEntity entity)
- Parameters:
entity - SceneEntity to attach
attachChild
public void attachChild(SceneNode node)
- Parameters:
node - SceneNode to attach
detatchChild
public void detatchChild(SceneNode node)
- Parameters:
node - SceneNode to detatch
getAbsoluteX
public int getAbsoluteX()
- Specified by:
getAbsoluteX in class HierarchyNode
- Returns:
- X location in absolute coordinates
- See Also:
HierarchyNode.getAbsoluteX()
getAbsoluteY
public int getAbsoluteY()
- Specified by:
getAbsoluteY in class HierarchyNode
- Returns:
- Y location in absolute coordinates
- See Also:
HierarchyNode.getAbsoluteY()
getChildren
public final java.util.Map<java.lang.String,SceneNode> getChildren()
- Returns:
- Returns the children.
getChildByName
public final SceneNode getChildByName(java.lang.String name)
- Parameters:
name - Name of the child to search for
- Returns:
SceneNode or null if not found