|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jreality.util.SceneGraphUtility
public class SceneGraphUtility
This class holds static methods that make the parsing/traversal etc of a scene graph more comfortable.
Constructor Summary | |
---|---|
SceneGraphUtility()
|
Method Summary | ||
---|---|---|
static void |
addChildNode(SceneGraphComponent parent,
SceneGraphNode node)
method to add a child of arbitrary type |
|
static List<SceneGraphPath> |
collectClippingPlanes(SceneGraphComponent rootNode)
Return list of paths from rootNode to an instance of ClippingPlane , |
|
static List<SceneGraphPath> |
collectLights(SceneGraphComponent rootNode)
Return list of paths from rootNode to an instance of Light . |
|
static
|
copy(T template)
Return a copy of the scene graph node template. |
|
static SceneGraphComponent |
createFullSceneGraphComponent()
|
|
static SceneGraphComponent |
createFullSceneGraphComponent(String name)
Allocate and return an instance of SceneGraphComponent fitted out with an instance
of Transformation and Appearance . |
|
static Geometry |
getFirstGeometry(SceneGraphComponent sgc)
|
|
static int |
getIndexOfChild(SceneGraphComponent parent,
SceneGraphComponent child)
Linear search for the index of child in childlist of parent. |
|
static List<SceneGraphPath> |
getPathsBetween(SceneGraphComponent begin,
SceneGraphNode end)
|
|
static List<SceneGraphPath> |
getPathsToNamedNodes(SceneGraphComponent root,
String name)
Find and return all paths fomr root to node with name name. |
|
static int |
getSignature(SceneGraphPath sgp)
Return the metric signature at the end of the path sgp by evaluating effective appearance for the attribute CommonAttributes.SIGNATURE . |
|
static void |
removeChildNode(SceneGraphComponent parent,
SceneGraphNode node)
Remove a child of arbitrary type. |
|
static void |
removeChildren(SceneGraphComponent c)
Remove all children (i.e., instances of SceneGraphComponent from this node. |
|
static void |
replaceChild(SceneGraphComponent c,
SceneGraphComponent ch)
Replace the first child with the given component. |
|
static void |
setSignature(SceneGraphComponent r,
int signature)
Set the signature of this sub-graph by setting the appearance attribute CommonAttributes.SIGNATURE . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SceneGraphUtility()
Method Detail |
---|
public static SceneGraphComponent createFullSceneGraphComponent()
public static SceneGraphComponent createFullSceneGraphComponent(String name)
SceneGraphComponent
fitted out with an instance
of Transformation
and Appearance
.
name
-
public static void replaceChild(SceneGraphComponent c, SceneGraphComponent ch)
c
- ch
- public static void removeChildren(SceneGraphComponent c)
SceneGraphComponent
from this node.
component
- TODO: this should be called removeChildComponents!public static void setSignature(SceneGraphComponent r, int signature)
CommonAttributes.SIGNATURE
.
r
- signature
- public static int getSignature(SceneGraphPath sgp)
CommonAttributes.SIGNATURE
.
sgp
-
public static List<SceneGraphPath> collectLights(SceneGraphComponent rootNode)
Light
.
rootNode
-
public static List<SceneGraphPath> collectClippingPlanes(SceneGraphComponent rootNode)
ClippingPlane
,
rootNode
-
public static List<SceneGraphPath> getPathsBetween(SceneGraphComponent begin, SceneGraphNode end)
public static List<SceneGraphPath> getPathsToNamedNodes(SceneGraphComponent root, String name)
root
- name
-
public static void removeChildNode(SceneGraphComponent parent, SceneGraphNode node)
node
- the child to remove
IllegalArgumentException
- if node is no childpublic static void addChildNode(SceneGraphComponent parent, SceneGraphNode node)
node
- the child to addpublic static int getIndexOfChild(SceneGraphComponent parent, SceneGraphComponent child)
parent
- child
-
public static <T extends SceneGraphNode> T copy(T template)
template
-
CopyVisitor
public static Geometry getFirstGeometry(SceneGraphComponent sgc)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |