|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.scenegraph.SceneGraph
public class SceneGraph
A SceneGraph provides all methods to control adding and removing Nodes of all kinds and adding and removing of RenderPasses. It also provides getters for the Root objects of a Scenegraph.
Xith3DEnvironment| Field Summary | |
|---|---|
protected static boolean |
CHECK_FOR_ILLEGAL_MODIFICATION
If true, the renderer checks for illegal nodes modification |
protected java.util.ArrayList<HUD> |
huds
|
ScenegraphModificationsListener |
modListener
|
| Constructor Summary | |
|---|---|
SceneGraph(Renderer renderer)
|
|
| 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. |
protected static void |
checkForIllegalModification(Node node)
can be used by nodes to make sure that a change is not being attempted at runtime. |
BranchGroup |
getBranchGroup()
|
BranchGroup |
getBranchGroup(int index)
|
HUD |
getHUD()
Returns the HUD (first) attached to the SceneGraph id any. |
int |
getNumberOfBranchGroups()
|
int |
getNumberOfViews()
|
Renderer |
getRenderer()
|
long |
getTotalNumChildren()
|
long |
getTotalNumShapes()
|
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 class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final boolean CHECK_FOR_ILLEGAL_MODIFICATION
checkForIllegalModification(Node),
Constant Field Valuesprotected final java.util.ArrayList<HUD> huds
public ScenegraphModificationsListener modListener
| Constructor Detail |
|---|
public SceneGraph(Renderer renderer)
| Method Detail |
|---|
protected static final void checkForIllegalModification(Node node)
public final Renderer getRenderer()
public final void addScenegraphModificationListener(ScenegraphModificationsListener modListener)
modListener - the new ScenegraphModificationsListener to addpublic final void removeScenegraphModificationListener(ScenegraphModificationsListener modListener)
modListener - the ScenegraphModificationsListener to be removedpublic final void addView(View view)
view - the View to be addedpublic final int getNumberOfViews()
public final View getView()
public View getView(int index)
index - the desired View's index in the SceneGraph
public final RenderPass addBranchGraph(BranchGroup branchGraph,
RenderPassConfig renderPassConfig)
branchGraph - the new branch graph to addrenderPassConfig - the configuration for the new RenderPass to add
BranchGroup,
RenderPassConfig,
BaseRenderPassConfig,
addParallelBranch( BranchGroup ),
addPerspectiveBranch( BranchGroup )public final RenderPass addPerspectiveBranch(BranchGroup branchGraph)
addBranchGraph( branchGraph, new RenderPassConfig( RenderPassConfigProvider.PERSPECTIVE_PROJECTION ) );
branchGraph - the BranchGroup used for the new RenderPass
BranchGroup,
addParallelBranch( BranchGroup )public final RenderPass addPerspectiveBranch()
addBranchGraph( new BranchGroup(), new RenderPassConfig( RenderPassConfigProvider.PERSPECTIVE_PROJECTION ) );
or
addPerspectiveBranch( new BranchGroup() );
addPerspectiveBranch( BranchGroup ),
addParallelBranch( BranchGroup )public final RenderPass addParallelBranch(BranchGroup branchGraph)
addBranchGraph( branchGraph, new RenderPassConfig( RenderPassConfigProvider.PARALLEL_PROJECTION ) );
branchGraph - the BranchGroup used for the new RenderPass
BranchGroup,
addPerspectiveBranch( BranchGroup )public final RenderPass addParallelBranch()
addBranchGraph( branchGraph, new RenderPassConfig( RenderPassConfigProvider.PARALLEL_PROJECTION ) );
or
addParallelBranch( new BranchGroup() );
addParallelBranch( BranchGroup ),
addPerspectiveBranch( BranchGroup )public final void removeBranchGraph(BranchGroup branchGraph)
branchGraph - the BranchGroup to removepublic final int getNumberOfBranchGroups()
public final long getTotalNumChildren()
public final long getTotalNumShapes()
public final BranchGroup getBranchGroup(int index)
public final BranchGroup getBranchGroup()
public final void removeRenderPass(RenderPass renderPass)
renderPass - the RenderPass to removepublic final BranchGroup addRenderPass(RenderPass renderPass)
renderPass - the new RenderPass to add
public final BranchGroup addRenderPassFirst(RenderPass renderPass)
renderPass - the new RenderPass to add
public final void removeAllBranchGraphs()
public final RenderPass addHUD(HUD hud)
hud - the HUD to be added to the SceneGraphpublic final HUD getHUD()
public final void removeHUD(HUD hud)
hud - the HUD to be removed from the SceneGraphinputMgr - the InputManager to get input events from
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||