de.grogra.imp3d.gl20
Class GL20Node

java.lang.Object
  extended by de.grogra.imp3d.gl20.GL20Node

public class GL20Node
extends java.lang.Object


Constructor Summary
GL20Node(long nodeID)
           
 
Method Summary
 GL20Resource createResource(int resourceClassType)
          create a GL20Resource resource for this GL20Node if no resource exists until now. if a GL20Resource exists it will be returned
 void destroy()
          destroy this GL20Node
static void enterNode(long nodeID)
          enter the GL20Node that is identified with given nodeID.
static GL20Node getCurrentNode()
           
 long getID()
          get the node ID of this GL20Node
 GL20Resource getResource()
          get the GL20Resource of this GL20Node
 int getSelectionState()
           
 int getStamp()
          get the last modification stamp of this GL20Node
 boolean isUpToDate(int stamp)
          check if this GL20Node incl. its resources are up to date
static java.util.ArrayList<GL20Node> leaveNode()
          Should be called when a node will be leaved.
 void setSelectionState(int selectionState)
           
 void setStamp(int stamp)
          set the modification stamp of this GL20Node
static void startNewVisit(GL20Node rootNode)
          start a new traveling over the graph
 void update(int stamp)
          signal the end of an update of this GL20Node after updating this GL20Node and its resource the internal modification stamp will set to the given one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GL20Node

public GL20Node(long nodeID)
Method Detail

createResource

public final GL20Resource createResource(int resourceClassType)
create a GL20Resource resource for this GL20Node if no resource exists until now. if a GL20Resource exists it will be returned

Parameters:
resourceClassType - the class and the type of the GL20Resource that should be created
Returns:
GL20Resource of this GL20Node
See Also:
getResource()

destroy

public final void destroy()
destroy this GL20Node


enterNode

public static void enterNode(long nodeID)
enter the GL20Node that is identified with given nodeID. If such a node doesn't exists, it will created and added to the graph structure.

Parameters:
nodeID - the ID of the node that should be entered

getCurrentNode

public static GL20Node getCurrentNode()

getID

public final long getID()
get the node ID of this GL20Node

Returns:
the node ID

getResource

public final GL20Resource getResource()
get the GL20Resource of this GL20Node

Returns:
null - no GL20Resource exists to this GL20Node; otherwise - the GL20Resource of this GL20Node

getSelectionState

public final int getSelectionState()

getStamp

public final int getStamp()
get the last modification stamp of this GL20Node

Returns:
the last modification stamp

isUpToDate

public final boolean isUpToDate(int stamp)
check if this GL20Node incl. its resources are up to date

Parameters:
stamp - the modification stamp of the associated
Returns:
true - this GL20Node and the resources are up to date

leaveNode

public static java.util.ArrayList<GL20Node> leaveNode()
Should be called when a node will be leaved. The returned GL20Nodes wasn't visited in this run.

Returns:
GL20Nodes that wasn't visited in this run OR null when all GL20Nodes was visit.

setSelectionState

public final void setSelectionState(int selectionState)

setStamp

public final void setStamp(int stamp)
set the modification stamp of this GL20Node

Parameters:
stamp - the modification stamp

startNewVisit

public static void startNewVisit(GL20Node rootNode)
start a new traveling over the graph

Parameters:
rootNode - the root GL20Node of the graph

update

public final void update(int stamp)
signal the end of an update of this GL20Node after updating this GL20Node and its resource the internal modification stamp will set to the given one.

Parameters:
stamp - the current modification stamp