org.xith3d.scenegraph
Interface RenderableSceneGraph

All Superinterfaces:
CanvasBag
All Known Implementing Classes:
Xith3DEnvironment

public interface RenderableSceneGraph
extends CanvasBag

The RenderableSceneGraph interface simply unites the SceneGraph and CanvasBag interfaces.


Method Summary
 RenderPass addBranchGraph(BranchGroup branchGraph, RenderPassConfig renderPassConfig)
          Adds a new BranchGroup to the SceneGraph's Locale.
 RenderPass addHUD(HUD hud)
          Adds a HUD to the SceneGraph and sets all necessary properties.
 RenderPass addParallelBranch()
          Adds a parallel (projected) RenderPass and links it to a new BranchGroup, which is also been added to the Locale.
 RenderPass addParallelBranch(BranchGroup branchGraph)
          Adds a parallel (projected) RenderPass and links it to the given BranchGroup.
 RenderPass addPerspectiveBranch()
          Adds a perspective (projected) RenderPass and links it to a new BranchGroup, which also been added to the Locale.
 RenderPass addPerspectiveBranch(BranchGroup branchGraph)
          Adds a perspective (projected) RenderPass and links it to the given BranchGroup.
 BranchGroup addRenderPass(RenderPass renderPass)
          Adds a RenderPass to the SceneGraph's Renderer.
 BranchGroup addRenderPassFirst(RenderPass renderPass)
          Adds a RenderPass to the SceneGraph at first position.
 void addScenegraphModificationListener(ScenegraphModificationsListener modListener)
          Adds a new ScenegraphModificationListener to the List.
 void addView(View view)
          Adds a new View to the SceneGraph.
 BranchGroup getBranchGroup()
           
 Renderer getRenderer()
           
 View getView()
           
 View getView(int index)
           
 void removeAllBranchGraphs()
          Removes all children from the SceneGraph.
 void removeBranchGraph(BranchGroup branchGraph)
          Removes the given BranchGroup from the SceneGraph.
 void removeHUD(HUD hud)
          Removes a HUD from the SceneGraph.
 void removeRenderPass(RenderPass renderPass)
          Removes the given RenderPass from the SceneGraph's Renderer.
 void removeScenegraphModificationListener(ScenegraphModificationsListener modListener)
          Removes a ScenegraphModificationListener from the List.
 
Methods inherited from interface org.xith3d.render.CanvasBag
addCanvas, addCanvas, addCanvas, addCanvas, getCanvas, getCanvas, isCanvasAlive, isCanvasAlive, removeAllCanvas3Ds, removeCanvas, removeCanvas, reviveCanvas, reviveCanvas, suspendCanvas, suspendCanvas
 

Method Detail

getRenderer

Renderer getRenderer()
Returns:
this SceneGraph's Renderer.

addScenegraphModificationListener

void addScenegraphModificationListener(ScenegraphModificationsListener modListener)
Adds a new ScenegraphModificationListener to the List. It will be notified of any scenegraph change at runtime.

Parameters:
modListener - the new ScenegraphModificationsListener to add

removeScenegraphModificationListener

void removeScenegraphModificationListener(ScenegraphModificationsListener modListener)
Removes a ScenegraphModificationListener from the List.

Parameters:
modListener - the ScenegraphModificationsListener to be removed

getBranchGroup

BranchGroup getBranchGroup()
Returns:
the first BranchGroup in this environemnt or null.

getView

View getView()
Returns:
this SceneGraph's (first) View or null, if no View is present.

getView

View getView(int index)
Parameters:
index - the desired View's index in the SceneGraph
Returns:
this SceneGraph's View with the specified index.

addView

void addView(View view)
Adds a new View to the SceneGraph.

Parameters:
view - the View to be added

addBranchGraph

RenderPass addBranchGraph(BranchGroup branchGraph,
                          RenderPassConfig renderPassConfig)
Adds a new BranchGroup to the SceneGraph's Locale.
The also created and added RenderPass is automatically linked with the BranchGroup.

There're convenience methods, with which you don't need to pass a RenderPassConfigProvider.

Parameters:
branchGraph - the new branch graph to add
renderPassConfig - the configuration for the new RenderPass to add
Returns:
the created RenderPass
See Also:
BranchGroup, RenderPassConfig, BaseRenderPassConfig, addParallelBranch( BranchGroup ), addPerspectiveBranch( BranchGroup )

addPerspectiveBranch

RenderPass addPerspectiveBranch(BranchGroup branchGraph)
Adds a perspective (projected) RenderPass and links it to the given BranchGroup.

This is a convenience method and is functionally equal to:
addBranchGraph( branchGraph, new RenderPassConfig( RenderPassConfigProvider.PERSPECTIVE_PROJECTION ) );

Parameters:
branchGraph - the BranchGroup used for the new RenderPass
Returns:
the created RenderPass
See Also:
BranchGroup, addParallelBranch( BranchGroup )

addPerspectiveBranch

RenderPass addPerspectiveBranch()
Adds a perspective (projected) RenderPass and links it to a new BranchGroup, which also been added to the Locale.

This is a convenience method and is functionally equal to:
addBranchGraph( new BranchGroup(), new RenderPassConfig( RenderPassConfigProvider.PERSPECTIVE_PROJECTION ) );
or
addPerspectiveBranch( new BranchGroup() );

Returns:
the created RenderPass
See Also:
addPerspectiveBranch( BranchGroup ), addParallelBranch( BranchGroup )

addParallelBranch

RenderPass addParallelBranch(BranchGroup branchGraph)
Adds a parallel (projected) RenderPass and links it to the given BranchGroup.

This is a convenience method and is functionally equal to:
addBranchGraph( branchGraph, new RenderPassConfig( RenderPassConfigProvider.PARALLEL_PROJECTION ) );

Parameters:
branchGraph - the BranchGroup used for the new RenderPass
Returns:
the created RenderPass
See Also:
BranchGroup, addPerspectiveBranch( BranchGroup )

addParallelBranch

RenderPass addParallelBranch()
Adds a parallel (projected) RenderPass and links it to a new BranchGroup, which is also been added to the Locale.

This is a convenience method and is functionally equal to:
addBranchGraph( branchGraph, new RenderPassConfig( RenderPassConfigProvider.PARALLEL_PROJECTION ) );
or
addParallelBranch( new BranchGroup() );

Returns:
the created RenderPass
See Also:
addParallelBranch( BranchGroup ), addPerspectiveBranch( BranchGroup )

removeBranchGraph

void removeBranchGraph(BranchGroup branchGraph)
Removes the given BranchGroup from the SceneGraph.
The assotiated RenderPass is also removed from the Renderer.

Parameters:
branchGraph - the BranchGroup to remove

removeRenderPass

void removeRenderPass(RenderPass renderPass)
Removes the given RenderPass from the SceneGraph's Renderer.
The assotiated BranchGroup is also removed.

Parameters:
renderPass - the RenderPass to remove

addRenderPass

BranchGroup addRenderPass(RenderPass renderPass)
Adds a RenderPass to the SceneGraph's Renderer.
The BranchGroup assotiated to the RenderPass is also added to the SceneGraph.

Parameters:
renderPass - the new RenderPass to add
Returns:
the RenderPass'es BranchGroup to add further children to

addRenderPassFirst

BranchGroup addRenderPassFirst(RenderPass renderPass)
Adds a RenderPass to the SceneGraph at first position.
The BranchGroup assotiated to the RenderPass is also added to the SceneGraph.

Parameters:
renderPass - the new RenderPass to add
Returns:
the RenderPass'es BranchGroup to add further children to

removeAllBranchGraphs

void removeAllBranchGraphs()
Removes all children from the SceneGraph.


addHUD

RenderPass addHUD(HUD hud)
Adds a HUD to the SceneGraph and sets all necessary properties.

Parameters:
hud - the HUD to be added to the SceneGraph
inputMgr - the InputManager to get input events from

removeHUD

void removeHUD(HUD hud)
Removes a HUD from the SceneGraph.

Parameters:
hud - the HUD to be removed from the SceneGraph