de.jreality.toolsystem
Class ToolSystem

java.lang.Object
  extended by de.jreality.toolsystem.ToolSystem
All Implemented Interfaces:
ToolEventReceiver

public class ToolSystem
extends Object
implements ToolEventReceiver

TODO: document this

Author:
weissman

Constructor Summary
ToolSystem(Viewer viewer, ToolSystemConfiguration config, RenderTrigger renderTrigger)
           
 
Method Summary
 void dispose()
           
 SceneGraphPath getAvatarPath()
           
 SceneGraphPath getEmptyPickPath()
           
 PickSystem getPickSystem()
           
 RenderTrigger getRenderTrigger()
           
static ToolSystem getToolSystemForViewer(Viewer v)
          This method just looks up and returns the possibly null toolsystem associated to viewer
 void initializeSceneTools()
           
 void processToolEvent(ToolEvent event)
           
 void setAvatarPath(SceneGraphPath p)
           
 void setEmptyPickPath(SceneGraphPath emptyPickPath)
           
 void setPickSystem(PickSystem pickSystem)
           
static void setToolSystemForViewer(Viewer v, ToolSystem ts)
           
static ToolSystem toolSystemForViewer(Viewer v)
          If v has a tool system already associated to it, return it.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolSystem

public ToolSystem(Viewer viewer,
                  ToolSystemConfiguration config,
                  RenderTrigger renderTrigger)
Parameters:
viewer - the viewer
config - the config
renderTrigger - a rendertrigger to synch or null - the ToolSystem does not take care of setting/removing the triggers viewer and scene root (on initialize/dispose)
Method Detail

toolSystemForViewer

public static ToolSystem toolSystemForViewer(Viewer v)
If v has a tool system already associated to it, return it. Otherwise allocate a default one

Parameters:
v -
Returns:

getToolSystemForViewer

public static ToolSystem getToolSystemForViewer(Viewer v)
This method just looks up and returns the possibly null toolsystem associated to viewer

Parameters:
v -
Returns:

setToolSystemForViewer

public static void setToolSystemForViewer(Viewer v,
                                          ToolSystem ts)

initializeSceneTools

public void initializeSceneTools()

processToolEvent

public void processToolEvent(ToolEvent event)
Specified by:
processToolEvent in interface ToolEventReceiver

setPickSystem

public void setPickSystem(PickSystem pickSystem)

getPickSystem

public PickSystem getPickSystem()

setAvatarPath

public void setAvatarPath(SceneGraphPath p)

getAvatarPath

public SceneGraphPath getAvatarPath()

dispose

public void dispose()

getEmptyPickPath

public SceneGraphPath getEmptyPickPath()

setEmptyPickPath

public void setEmptyPickPath(SceneGraphPath emptyPickPath)

getRenderTrigger

public RenderTrigger getRenderTrigger()