Class dnx.lr.Node
All Packages Class Hierarchy This Package Previous Next Index
Class dnx.lr.Node
java.lang.Object
|
+----dnx.util.DNXObject
|
+----dnx.lr.Node
- public class Node
- extends DNXObject
- implements DNXObservable
Node is the base class for all VRML nodes.
-
debugShowBoundingBoxes
-
-
debugShowFlags
-
-
debugShowUsingNodes
-
-
instances
- A pointer to the first of a list of the node's instances.
-
name
- The name of the node.
-
Node()
-
-
addObserver(DNXObserver)
-
-
addObserver(DNXObserver, int)
-
-
boundingBox(BoundingBox3)
- External function: set the argument to the bounding box of the
node.
-
boundingBoxHasChanged(Field)
- Meant to be overridden by subclasses.
-
circularityCheckNewNode(Node)
-
-
classToNodeTypeName(Class)
-
-
clone()
- Clone this node and all of its fields.
-
countIncomingRoutes()
-
-
countIncomingRoutes(int)
-
-
countInvisibleIncomingRoutes()
-
-
countInvisibleOutgoingRoutes()
-
-
countObservers()
-
-
countOccurrences()
- Return the number of times the node occurs in its NodeTreeContext.
-
countOutgoingRoutes()
-
-
countOutgoingRoutes(int)
- It's not acceptable to optimize away eventOuts if there aren't
any routes going out, because there still may be node observers,
and even if not, a Script node can call getEventOut() on any
Node at any time and query it to get the last value sent out.
-
createExtensionNode(String, ReadAction)
- Creates an extension node and initializes its field to the
default values.
-
createInvisibleRoute(Node, int, Node, int)
-
-
createNode(String)
- Creates a node and initializes its field to the default
values.
-
createNodeDefinition(NodeDefinition)
- Create the node definition.
-
debugPrint()
- Print out the subgraph rooted at this node onto System.err.
-
debugPrintBriefly()
-
-
deepClone()
- Clone this node and all of its fields.
-
deepClone(DeepCloneAction)
- Clone this node and all of its fields.
-
deepCloneList(NodeList)
- Do a deep clone of all nodes in the list, preserving shared
structure across the entire list and destructively modifying
the list with the cloned nodes.
-
deleteObserver(DNXObserver)
-
-
deleteObservers()
-
-
doTraverseInstances(InstancesOfNodeAction)
- This function "continues" the recursion started by
traverseInstances() -- it actually does the traversal, and is
overridden by subnodes.
-
doTraverseUpwards(UpwardMapping)
- "Continue" the upward traversal.
-
fieldChanged(Field)
- fieldChanged is called whenever one of a node's fields is
changed.
-
getDefinition()
- Return a sanitized version of the definition.
-
getEventInIndex(String)
- Look up an eventIn index given its name -- convenience function
that's equivalent to getDefinition().getEventInIndex().
-
getEventOut(int)
- Get the eventOut field at a specified index.
-
getEventOut(String)
- Get the eventOut field of a given name, or null if there is no field
of that name.
-
getEventOutIndex(Field)
- Look up an eventOut index given a field that refers to an eventOut,
or -1 if F is not one of the eventOut fields of this node.
-
getEventOutIndex(String)
- Look up an eventOut index given its name -- convenience function
that's equivalent to getDefinition().getEventOutIndex().
-
getEventOutName(Field)
- Return the name of an eventOut field of this node, or null if F
is not one of the eventOut fields of this node.
-
getField(int)
- Get the field at a specified index.
-
getField(String)
- Get the field of a given name, or null if there is no field
of that name.
-
getFieldIndex(Field)
- Look up a field index given the field, or -1 if F is not one of
the fields of this node.
-
getFieldIndex(String)
- Look up a field index given its name -- convenience function
that's equivalent to getDefinition().getFieldIndex().
-
getFieldInstanceIndex(Field)
- Return the index of the FieldInstance corresponding to
a child-carrying field.
-
getFieldName(Field)
- Return the name of a field of this node, or null if F is not
one of the fields of this node.
-
getIncomingRoute(int, Node, int)
- Look for a route from (FROM, EVENTOUT) to (THIS, EVENTIN).
-
getIncomingRoutes()
-
-
getIncomingRoutes(int)
-
-
getInstanceChildField(NodeInstance, int)
- Get the child field instance of a node instance at the specified
child field index.
-
getName()
- Return the name of the node (or null if the node is unnamed).
-
getNodeTreeContext()
- Return the NodeTreeContext that this node belongs to.
-
getObservableEngine()
-
-
getObserverEventMask()
-
-
getOutgoingRoute(int, Node, int)
- Look for a route from (THIS, EVENTOUT) to (TO, EVENTIN).
-
getOutgoingRoutes()
-
-
getOutgoingRoutes(int)
-
-
getParents()
- Return an enumeration of the parents of this node.
-
getPrimitiveNode()
- Return the "actual" node at the root of the node tree rooted
at node.
-
getProperty(Object)
- Get the value of a property.
-
getProperty(Object, Object)
- Get the value of a property.
-
getPropertyEqual(Object)
- Like getProperty() but compare keys with equals().
-
getPropertyEqual(Object, Object)
- Like getProperty() but compare keys with equals().
-
getSceneContext()
- Return the SceneContext that this node belongs to.
-
getUniquifiedInstance()
- If there's a uniquified instance of this node, return it;
Otherwise return null.
-
getUniquifiedInstanceOtherThan(NodeInstance)
-
-
handleAddToContext()
- The handleAddToContext method is called when a node has just
been added to a NodeTreeContext.
-
handleAddToScene()
- The handleAddToScene method is called when a node has just been
added to a scene.
-
handleEvent(SceneEvent)
- Handle an event.
-
handleFieldChange(Field)
- Handle a field change.
-
handleFrameEvent(double)
-
-
handleInstanceAttach(NodeInstance)
-
-
handleInstanceDetach(NodeInstance)
-
-
handleRemoveFromContext()
- The handleRemoveFromContext method is called when a node is
about to be removed from a NodeTreeContext.
-
handleRemoveFromScene()
- The handleRemoveFromScene method is called when a node is about
to be removed from a scene.
-
handleRestart()
- The handleRestart method is called when a stopped scene is
restarted.
-
handleStop()
- The handleStop method is called when the scene is stopped.
-
handleSyncEvent()
-
-
hasRoutes()
- Return true if there are any routes going into or out of
the node.
-
hasVisibleRoutes()
- Return true if there are any non-internal routes going into or out of
the node.
-
initFields()
- Initialize field values.
-
isBindableNode()
-
-
isGeometryNode()
-
-
isGroupingNode()
-
-
isLeafNode()
-
-
isPointerSensorNode()
-
-
isSubsidiaryNode()
-
-
isSubtreePropertyNode()
-
-
isTextureNode()
-
-
isTransformGroupingNode()
-
-
makeInstance()
- Return a non-uniquified instance of this node.
-
mapAllInstanceChildren(NodeInstance, ChildInstanceMapper, Object)
-
-
mapAllNodeChildren(ChildNodeMapper, Object)
-
-
mapAllTraversalPathInstanceChildren(NodeInstance, ChildInstanceMapper, Camera, Matrix4, Object)
-
-
mapAllTraversalPathNodeChildren(ChildNodeMapper, Camera, Matrix4, Object)
-
-
mapAuxGeomInstanceChildren(NodeInstance, ChildInstanceMapper, Object)
-
-
mapAuxGeomNodeChildren(ChildNodeMapper, Object)
-
-
mapInstances(InstanceMapper, Object)
- Map over all node instance objects of a node, calling
fun.instanceMapperCallback on each one.
-
mapNormalInstanceChildren(NodeInstance, ChildInstanceMapper, Object)
-
-
mapNormalNodeChildren(ChildNodeMapper, Object)
-
-
mapParents(ParentMapper, Object)
-
-
mapTraversalPathInstanceChildren(NodeInstance, ChildInstanceMapper, Camera, Matrix4, Object)
-
-
mapTraversalPathNodeChildren(ChildNodeMapper, Camera, Matrix4, Object)
-
-
nodeTypeNameToClass(String)
-
-
potentialChildCarryingFieldChange(Field, Node)
-
-
print(PrintAction)
- Print out the subgraph rooted at this node.
-
putProperty(Object, Object)
- Add an arbitrary property to a node instance.
-
putPropertyEqual(Object, Object)
- Like putProperty() but compare keys with equals().
-
readNode(ReadAction)
- Parse and create a new node.
-
recomputeBoundingBox(BoundingBox3)
- Meant to be overridden by subclasses; compute the bounding box
and store into the argument.
-
removeProperty(Object)
- Remove a property from a node instance.
-
removePropertyEqual(Object)
- Like removeProperty() but compare keys with equals().
-
setName(String)
- Name the node.
-
toString()
-
-
traverse(NodeTraversal)
- Perform a traversal of NODE and any of its children.
-
traverseInstances(InstancesOfNodeAction)
- Visit all node instance objects of a node.
-
traverseUpwards(UpwardMapping)
- Perform an upward traversal of this node and any of its parents.
-
typeName()
- Get the name of the type of this node.
-
unionBoundingBox(BoundingBox3, MFNode)
- Union the existing bounding box in BOX with the bounding boxes
of all the fields in F.
-
updateObservers(Object)
-
-
warn(String)
-
name
protected String name
- The name of the node.
instances
protected NodeInstance instances
- A pointer to the first of a list of the node's instances. If
there is a non-uniquified instance, it is the first in the list.
The rest are uniquified instances, but only those that belong
within the scene. (The list is threaded through the
nextLinked/prevLinked fields of each instance in the list.)
There may also be ghosted instances outside of the scene.
However, these are not tracked, either here or in the nextLinked/
prevLinked fields of the instances within the scene.
debugShowUsingNodes
public static boolean debugShowUsingNodes
debugShowFlags
public static boolean debugShowFlags
debugShowBoundingBoxes
public static boolean debugShowBoundingBoxes
Node
public Node()
classToNodeTypeName
public static String classToNodeTypeName(Class cl)
nodeTypeNameToClass
public static Class nodeTypeNameToClass(String type)
createNodeDefinition
protected abstract void createNodeDefinition(NodeDefinition def)
- Create the node definition. This method is only called when
constructing the first instance of the node class. By default,
it leaves the NodeDefinition empty--no fields, no defaults
initFields
protected abstract void initFields()
- Initialize field values.
setName
public void setName(String s)
- Name the node.
getName
public String getName()
- Return the name of the node (or null if the node is unnamed).
getNodeTreeContext
public final NodeTreeContext getNodeTreeContext()
- Return the NodeTreeContext that this node belongs to.
@see NodeTreeContext
getSceneContext
public final SceneContext getSceneContext()
- Return the SceneContext that this node belongs to. This is
gotten by retrieving the SceneContext of the NodeTreeContext.
getDefinition
public ConstNodeDefinition getDefinition()
- Return a sanitized version of the definition.
@see ConstNodeDefinition
getFieldIndex
public int getFieldIndex(String name)
- Look up a field index given its name -- convenience function
that's equivalent to getDefinition().getFieldIndex().
getEventInIndex
public int getEventInIndex(String name)
- Look up an eventIn index given its name -- convenience function
that's equivalent to getDefinition().getEventInIndex().
getEventOutIndex
public int getEventOutIndex(String name)
- Look up an eventOut index given its name -- convenience function
that's equivalent to getDefinition().getEventOutIndex().
getFieldIndex
public int getFieldIndex(Field f)
- Look up a field index given the field, or -1 if F is not one of
the fields of this node.
getEventOutIndex
public int getEventOutIndex(Field f)
- Look up an eventOut index given a field that refers to an eventOut,
or -1 if F is not one of the eventOut fields of this node.
getFieldInstanceIndex
public int getFieldInstanceIndex(Field f)
- Return the index of the FieldInstance corresponding to
a child-carrying field.
getFieldName
public String getFieldName(Field f)
- Return the name of a field of this node, or null if F is not
one of the fields of this node.
getEventOutName
public String getEventOutName(Field f)
- Return the name of an eventOut field of this node, or null if F
is not one of the eventOut fields of this node.
getField
public Field getField(int index)
- Get the field at a specified index.
getField
public Field getField(String name)
- Get the field of a given name, or null if there is no field
of that name.
getEventOut
public Field getEventOut(int index)
- Get the eventOut field at a specified index.
getEventOut
public Field getEventOut(String name)
- Get the eventOut field of a given name, or null if there is no field
of that name.
getParents
public Enumeration getParents()
- Return an enumeration of the parents of this node. If this
node occurs multiple times under the same parent, that parent
will be returned multiple times by the enumeration (although
all such occurrences will be contiguous).
getInstanceChildField
protected FieldInstance getInstanceChildField(NodeInstance inst,
int index)
- Get the child field instance of a node instance at the specified
child field index. This is *NOT* the same as the field index;
use fieldIndexToFieldInstanceIndex() and fieldInstanceIndexToFieldIndex()
(on the definition) to convert.
readNode
public static Node readNode(ReadAction a) throws IOException, VRMLSyntaxException
- Parse and create a new node. This method returns null if
a node can't be read because EOF is reached.
createNode
public static Node createNode(String nodeName)
- Creates a node and initializes its field to the default
values. This searches the CLASSPATH. This returns null
if the node type is not recognized.
createExtensionNode
public static Node createExtensionNode(String classname,
ReadAction a)
- Creates an extension node and initializes its field to the
default values. This searches in the `classes/' subdirectory of
the URL of the scene loaded or being loaded, as specified in the
ReadAction. Note that this will dynamically load new node types
as necessary -- this allows a very powerful form of
extensibility. This returns null if the node type cannot be
loaded.
deepClone
public Object deepClone()
- Clone this node and all of its fields. The new node is in no scene.
Recursively clone all child nodes, making sure to preserve any
structure-sharing.
deepClone
public Object deepClone(DeepCloneAction a)
- Clone this node and all of its fields. The new node is in no scene.
Recursively clone all child nodes, making sure to preserve any
structure-sharing. Use the provided DeepCloneAction. (Doing it
this way allows access to the hashtable in the DeepCloneAction
that maps nodes to their clones.)
The DeepCloneAction is not cleared out before doing the deep clone.
This means that you can do successive deep clones of multiple nodes
and preserve shared structure across all of them by successively
calling this function, passing in the same DeepCloneAction each time.
deepCloneList
public static void deepCloneList(NodeList li)
- Do a deep clone of all nodes in the list, preserving shared
structure across the entire list and destructively modifying
the list with the cloned nodes. Note that you can get an equivalent
result using deepClone (DeepCloneAction), but this function may be
a bit more convenient.
clone
public Object clone()
- Clone this node and all of its fields. The new node is in no scene.
- Overrides:
- clone in class Object
getObservableEngine
public DNXObservableEngine getObservableEngine()
getObserverEventMask
public int getObserverEventMask()
addObserver
public void addObserver(DNXObserver o)
addObserver
public void addObserver(DNXObserver o,
int mask)
countObservers
public synchronized int countObservers()
deleteObserver
public synchronized void deleteObserver(DNXObserver o)
deleteObservers
public synchronized void deleteObservers()
updateObservers
protected void updateObservers(Object o)
createInvisibleRoute
protected Route createInvisibleRoute(Node fromNode,
int outEvent,
Node toNode,
int inEvent)
countIncomingRoutes
public final synchronized int countIncomingRoutes(int index)
countIncomingRoutes
public final synchronized int countIncomingRoutes()
countInvisibleIncomingRoutes
public final synchronized int countInvisibleIncomingRoutes()
countOutgoingRoutes
public final synchronized int countOutgoingRoutes(int index)
- It's not acceptable to optimize away eventOuts if there aren't
any routes going out, because there still may be node observers,
and even if not, a Script node can call getEventOut() on any
Node at any time and query it to get the last value sent out.
countOutgoingRoutes
public final synchronized int countOutgoingRoutes()
countInvisibleOutgoingRoutes
public final synchronized int countInvisibleOutgoingRoutes()
getIncomingRoutes
public Enumeration getIncomingRoutes(int index)
getOutgoingRoutes
public Enumeration getOutgoingRoutes(int index)
getIncomingRoutes
public Enumeration getIncomingRoutes()
getOutgoingRoutes
public Enumeration getOutgoingRoutes()
getIncomingRoute
public Route getIncomingRoute(int eventIn,
Node from,
int eventOut)
- Look for a route from (FROM, EVENTOUT) to (THIS, EVENTIN). Return
the route if it exists; otherwise, return null.
getOutgoingRoute
public Route getOutgoingRoute(int eventOut,
Node to,
int eventIn)
- Look for a route from (THIS, EVENTOUT) to (TO, EVENTIN). Return
the route if it exists; otherwise, return null.
hasRoutes
public final synchronized boolean hasRoutes()
- Return true if there are any routes going into or out of
the node.
hasVisibleRoutes
public final synchronized boolean hasVisibleRoutes()
- Return true if there are any non-internal routes going into or out of
the node.
putProperty
public void putProperty(Object key,
Object value)
- Add an arbitrary property to a node instance. This mechanism
allows you to attach instance-specific data to an instance.
Keys are compared using the `==' operator. Therefore, don't
use strings as keys; instead, use the Symbol object, by calling
Symbol.intern ("string") to convert a string into a Symbol.
If the key already exists, its value is replaced.
@see dnx.util.Symbol
@see dnx.util.PropertyList
getProperty
public Object getProperty(Object key)
- Get the value of a property. Keys are compared using the `=='
operator; this means that the keys should not be strings (use
Symbols instead). If the key is not found, null is returned.
@see dnx.util.Symbol
@see dnx.util.PropertyList
getProperty
public Object getProperty(Object key,
Object defalt)
- Get the value of a property. Keys are compared using the `=='
operator; this means that the keys should not be strings (use
Symbols instead). If the key is not found, DEFALT is returned.
@see dnx.util.Symbol
@see dnx.util.PropertyList
removeProperty
public boolean removeProperty(Object key)
- Remove a property from a node instance. Keys are compared
using the `==' operator; this means that the keys should not be
strings (use Symbols instead). Return value is true if the key
was found.
@see dnx.util.Symbol
@see dnx.util.PropertyList
putPropertyEqual
public void putPropertyEqual(Object key,
Object value)
- Like putProperty() but compare keys with equals().
getPropertyEqual
public Object getPropertyEqual(Object key)
- Like getProperty() but compare keys with equals().
getPropertyEqual
public Object getPropertyEqual(Object key,
Object defalt)
- Like getProperty() but compare keys with equals().
removePropertyEqual
public boolean removePropertyEqual(Object key)
- Like removeProperty() but compare keys with equals().
potentialChildCarryingFieldChange
protected void potentialChildCarryingFieldChange(Field f,
Node newValue)
fieldChanged
public final void fieldChanged(Field f)
- fieldChanged is called whenever one of a node's fields is
changed. It is called by particular field classes as necessary.
You should not call it yourself. This method handles posting
_changed events to any listeners, and then calls
handleFieldChange(), which may be overridden by nodes that want
to do something interesting when their field values change.
boundingBox
public void boundingBox(BoundingBox3 box)
- External function: set the argument to the bounding box of the
node.
recomputeBoundingBox
protected void recomputeBoundingBox(BoundingBox3 box)
- Meant to be overridden by subclasses; compute the bounding box
and store into the argument.
boundingBoxHasChanged
protected boolean boundingBoxHasChanged(Field f)
- Meant to be overridden by subclasses. A change has happened to
the given field and we've already called handleFieldChange();
return true if the bounding box might have changed. If you
define recomputeBoundingBox(), you should consider very strongly
defining this as well.
unionBoundingBox
protected void unionBoundingBox(BoundingBox3 box,
MFNode f)
- Union the existing bounding box in BOX with the bounding boxes
of all the fields in F. This doesn't reset BOX first; you've got
to do that yourself if you want that behavior.
handleFieldChange
protected void handleFieldChange(Field f)
- Handle a field change. This is called whenever any of the
fields of the node changes its value. This includes when a
node is read in, for all fields with values specified.
(For fields that are not explicitly specified in the VRML file,
and thus assume their default value, handleFieldChange() on the
field is not called.)
Note the following caveats:
-- Nodes that override this method *MUST* call their superclass's
handleFieldChange() method, preferably at the end of the
overriding method.
-- A change to one of the fields of a child of a node does not
cause the node's handleFieldChange() method to be called.
If you want such changes propagated up, the child node
needs to explicitly propagate it up to all parents.
-- If your handleFieldChange() method propagates changes up
to its parents, you should be aware of the following additional
caveats:
-- As well as receiving field-change propagations from its children,
the parent node should note whenever children are added or
deleted (i.e. handleFieldChange() is called on one of its child-
carrying fields) and do the same as if it received a field-change
propagation from a child.
-- Nodes that are not within a NodeTreeContext do not keep track
of their parent nodes. Therefore, adding a node to a
NodeTreeContext will suddenly cause the node to "gain" more
children for the purpose of propagation up from those children.
In other words, a node that receives field-change propagations
from its children should override handleAddToContext() and
do the same as if it received a field-change propagation from
a child. (And remember that handleAddToContext() needs to
chain to its superclass just like handleFieldChange().)
Note also that changes to fields (and a corresponding call to
handleFieldChange()) can occur for various reasons, e.g. as a
result of an event being sent or simply because some Java code
explicitly modifies the field.
handleEvent
protected void handleEvent(SceneEvent ev)
- Handle an event.
handleAddToScene
protected void handleAddToScene()
- The handleAddToScene method is called when a node has just been
added to a scene. getSceneContext() specifies the scene.
(Adding to a scene means that getSceneContext() changes from null
to non-null.) The default method just does nothing.
Note that when a tree of nodes is added to a scene,
handleAddToScene() is called from the bottom up (post-order).
-- Nodes that override this method *MUST* call their superclass's
handleAddToScene() method, preferably at the end of the
overriding method.
handleRemoveFromScene
protected void handleRemoveFromScene()
- The handleRemoveFromScene method is called when a node is about
to be removed from a scene. getSceneContext() specifies the
scene. (Removing from a scene means that getSceneContext()
changes from non-null to null.) The default method just does
nothing.
Note that when a tree of nodes is removed from a scene,
handleRemoveFromScene() is called from top down (pre-order).
Note the following caveats:
-- Nodes that override this method *MUST* call their superclass's
handleRemoveFromScene() method, preferably at the end of the
overriding method.
handleAddToContext
protected void handleAddToContext()
- The handleAddToContext method is called when a node has just
been added to a NodeTreeContext. getNodeTreeContext() specifies
the NodeTreeContext. (Adding to a NodeTreeContext means that
getNodeTreeContext() changes from null to non-null.) The default
method just does nothing.
Note that when a tree of nodes is added to a context,
handleAddToContext() is called from the bottom up (post-order).
However, at the time that handleAddToContext() is called on a
node, all parent nodes will already have the new context set on
them.
Note the following caveats:
-- Nodes that override this method *MUST* call their superclass's
handleAddToContext() method, preferably at the end of the
overriding method.
-- See handleFieldChange() about the relationship between it and
this method.
handleRemoveFromContext
protected void handleRemoveFromContext()
- The handleRemoveFromContext method is called when a node is
about to be removed from a NodeTreeContext. getNodeTreeContext()
specifies the NodeTreeContext. (Removing from a NodeTreeContext
means that getNodeTreeContext() changes from non-null to null.)
The default method just does nothing.
Note that when a tree of nodes is removed from a scene,
handleRemoveFromContext() is called from top down (pre-order).
Note the following caveats:
-- Nodes that override this method *MUST* call their superclass's
handleRemoveFromContext() method, preferably at the end of the
overriding method.
handleInstanceAttach
protected void handleInstanceAttach(NodeInstance inst)
handleInstanceDetach
protected void handleInstanceDetach(NodeInstance inst)
handleFrameEvent
protected void handleFrameEvent(double time)
handleSyncEvent
protected void handleSyncEvent()
handleStop
protected void handleStop()
- The handleStop method is called when the scene is stopped. If
a node has any threads running, it should stop them.
handleRestart
protected void handleRestart()
- The handleRestart method is called when a stopped scene is
restarted. If a node needs to restart any threads, it should
do so here. Note that this method is *NOT* called when a node
is first added to a scene. If you want to start a thread or do
similar action at that time, you should override
handleAddToScene().
debugPrint
public void debugPrint()
- Print out the subgraph rooted at this node onto System.err.
debugPrintBriefly
public void debugPrintBriefly()
print
public void print(PrintAction a)
- Print out the subgraph rooted at this node.
getUniquifiedInstance
public NodeInstance getUniquifiedInstance()
- If there's a uniquified instance of this node, return it;
Otherwise return null. In general, it's a bad idea to call this
-- it probably indicates a logic flaw in your program, and using
this function means that you don't handle multiply-instanced
nodes correctly. But in some cases, there's no help for this
(partially due to general bogosities and ill-thoughtedness in the
VRML 2.0 spec, esp. w.r.t. bindable nodes).
getUniquifiedInstanceOtherThan
public NodeInstance getUniquifiedInstanceOtherThan(NodeInstance notThis)
makeInstance
protected NodeInstance makeInstance()
- Return a non-uniquified instance of this node. Note that
at most one non-uniquified instance exists at any one time,
so this will simply return the existing one if there is one.
If you're thinking about calling this, think again. In general,
you never ever want to see non-uniquified nodes.
mapAllNodeChildren
public final boolean mapAllNodeChildren(ChildNodeMapper fun,
Object mapData)
mapAllTraversalPathNodeChildren
public final boolean mapAllTraversalPathNodeChildren(ChildNodeMapper fun,
Camera cam,
Matrix4 objectToViewerMatrix,
Object mapData)
mapNormalNodeChildren
public boolean mapNormalNodeChildren(ChildNodeMapper fun,
Object mapData)
mapAuxGeomNodeChildren
public final boolean mapAuxGeomNodeChildren(ChildNodeMapper fun,
Object mapData)
mapTraversalPathNodeChildren
public boolean mapTraversalPathNodeChildren(ChildNodeMapper fun,
Camera cam,
Matrix4 objectToViewerMatrix,
Object mapData)
mapParents
public final boolean mapParents(ParentMapper fun,
Object mapData)
mapInstances
public final boolean mapInstances(InstanceMapper fun,
Object mapData)
- Map over all node instance objects of a node, calling
fun.instanceMapperCallback on each one. Note that the first
instance visited is the non-uniquified one.
This is an *INTERNAL* function and the same provisos apply
as for makeInstance().
mapAllInstanceChildren
public final NodeInstance mapAllInstanceChildren(NodeInstance inst,
ChildInstanceMapper fun,
Object mapData)
mapAllTraversalPathInstanceChildren
public final NodeInstance mapAllTraversalPathInstanceChildren(NodeInstance inst,
ChildInstanceMapper fun,
Camera cam,
Matrix4 objectToViewerMatrix,
Object mapData)
mapNormalInstanceChildren
public NodeInstance mapNormalInstanceChildren(NodeInstance inst,
ChildInstanceMapper fun,
Object mapData)
mapAuxGeomInstanceChildren
public final NodeInstance mapAuxGeomInstanceChildren(NodeInstance inst,
ChildInstanceMapper fun,
Object mapData)
mapTraversalPathInstanceChildren
public NodeInstance mapTraversalPathInstanceChildren(NodeInstance inst,
ChildInstanceMapper fun,
Camera cam,
Matrix4 objectToViewerMatrix,
Object mapData)
traverseInstances
public final boolean traverseInstances(InstancesOfNodeAction a)
- Visit all node instance objects of a node. Note that the first
instance visited is the non-uniquified one.
This is an *INTERNAL* function and the same provisos apply
as for makeInstance().
doTraverseInstances
public boolean doTraverseInstances(InstancesOfNodeAction a)
- This function "continues" the recursion started by
traverseInstances() -- it actually does the traversal, and is
overridden by subnodes. Unless you're a subclass of Node, you
generally do *NOT* want to be calling this. Call
traverseInstances() instead, if you need to be messing with
this at all.
traverse
public final boolean traverse(NodeTraversal trav)
- Perform a traversal of NODE and any of its children.
The return value is true if the traversal was terminated early due
to a visit() function having returned STOP.
Don't confuse this with a traversal of a node instance.
NOTE: If a node occurs multiple times in the scene, this will
normally visit the node only once, unless the traversal object
sets allowMultipleVisits to true.
traverseUpwards
public boolean traverseUpwards(UpwardMapping um)
- Perform an upward traversal of this node and any of its parents.
The return value is true if the traversal was terminated early due
to a visit() function having returned STOP.
doTraverseUpwards
protected boolean doTraverseUpwards(UpwardMapping vart)
- "Continue" the upward traversal.
circularityCheckNewNode
public void circularityCheckNewNode(Node newParent)
countOccurrences
public int countOccurrences()
- Return the number of times the node occurs in its NodeTreeContext.
This is the number of times that a DEF or USE of the node appears
in the VRML file. This is not necessarily the same as the number
of instances, which can be much greater with nested USE's.
warn
protected void warn(String str)
typeName
public String typeName()
- Get the name of the type of this node. The type name is the
class name minus the suffix 'Node' and the package name prefix.
If the node was created from a prototype, typeName() returns
the name of the prototype.
- Overrides:
- typeName in class DNXObject
toString
public String toString()
- Overrides:
- toString in class Object
getPrimitiveNode
public Node getPrimitiveNode()
- Return the "actual" node at the root of the node tree rooted
at node. If this is a PrototypeNode, the return value is the
non-PrototypeNode that is the root of the prototype. Otherwise,
the return value is this.
isBindableNode
public final boolean isBindableNode()
isGeometryNode
public final boolean isGeometryNode()
isGroupingNode
public final boolean isGroupingNode()
isTransformGroupingNode
public final boolean isTransformGroupingNode()
isLeafNode
public final boolean isLeafNode()
isPointerSensorNode
public final boolean isPointerSensorNode()
isSubtreePropertyNode
public final boolean isSubtreePropertyNode()
isSubsidiaryNode
public final boolean isSubsidiaryNode()
isTextureNode
public final boolean isTextureNode()
All Packages Class Hierarchy This Package Previous Next Index