com.jme.sound.openAL.scene
Class SoundNode
java.lang.Object
com.jme.sound.openAL.scene.Playable
com.jme.sound.openAL.scene.SoundSpatial
com.jme.sound.openAL.scene.SoundNode
- public class SoundNode
- extends SoundSpatial
Node defines an internal node of a scene graph. The internal
node maintains a collection of children and handles merging said children
into a single bound to allow for very fast culling of multiple nodes.
Node allows for any number of children to be attached.
- Version:
- $Id: SoundNode.java,v 1.2 2005/04/24 21:02:30 anakan Exp $
- Author:
- Mark Powell
|
Constructor Summary |
SoundNode()
Constructor instantiates a new Node with a default empty
list for containing children. |
| Methods inherited from class com.jme.sound.openAL.scene.Playable |
getFxChorusID, getFxCompressorID, getFxDistorsionID, getFxEchoID, getFxFlangerID, getFxGargleID, getFxI3DL2ReverbID, getFxMaxID, getFxParamEqID, getFxWavesReverbID, resetConfig, setFxChorusID, setFxCompressorID, setFxDistorsionID, setFxEchoID, setFxFlangerID, setFxGargleID, setFxI3DL2ReverbID, setFxMaxID, setFxParamEqID, setFxWavesReverbID |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
eventStatusChanged
protected boolean eventStatusChanged
eventNumber
protected int eventNumber
SoundNode
public SoundNode()
- Constructor instantiates a new
Node with a default empty
list for containing children.
getQuantity
public int getQuantity()
getQuantity returns the number of children this node
maintains.
- Returns:
- the number of children this node maintains.
attachChild
public int attachChild(SoundSpatial child)
attachChild attaches a child to this node. This node
becomes the child's parent. The current number of children maintained
is returned.
- Parameters:
child - the child to attach to this node.
- Returns:
- the number of children maintained by this node.
detachChild
public int detachChild(SoundSpatial child)
detachChild removes a given child from the node's list.
This child will no longe be maintained.
- Parameters:
child - the child to remove.
- Returns:
- the index the child was at. -1 if the child was not in the list.
detachChildAt
public SoundSpatial detachChildAt(int index)
detachChildAt removes a child at a given index. That
child is returned for saving purposes.
- Parameters:
index - the index of the child to be removed.
- Returns:
- the child at the supplied index.
setChild
public SoundSpatial setChild(int i,
SoundSpatial child)
setChild places a child at a given index. If a child is
already set to that index the old child is returned.
- Parameters:
i - the index to set the child to.child - the child to attach.
- Returns:
- the old child at the index.
getChild
public SoundSpatial getChild(int i)
getChild returns a child at a given index.
- Parameters:
i - the index to retrieve the child from.
- Returns:
- the child at a specified index.
updateWorldData
public void updateWorldData(float time)
updateWorldData updates all the children maintained by
this node.
- Overrides:
updateWorldData in class SoundSpatial
- Parameters:
time - the frame time.
draw
public void draw()
draw calls the onDraw method for each child maintained
by this node.
- Specified by:
draw in class SoundSpatial
- See Also:
Spatial.draw(com.jme.renderer.Renderer)
fireEvent
public boolean fireEvent(int event)
- Specified by:
fireEvent in class SoundSpatial
onEvent
public void onEvent(int event)