gumbo.graphic.probe
Interface IntersectionNode

All Superinterfaces:
Graphic, GraphicGeometry, IntersectableGraphic
All Known Implementing Classes:
AbstractIntersectionNode

public interface IntersectionNode
extends IntersectableGraphic

A node in an abstract intersection tree, which supports efficient hierarchical intersection of complex geometric shapes. An intersection node serves as a proxy for an intersectable target object, with intersection testing of children nodes occuring only if the parent node's target is intersected. Child nodes that are not IntersectableGraphic are ignored.

Unless otherwise noted, intersection testing for this node must occur as follows. Note that a "real target" is a non-null intersection target that is not this object. If this node has no real target or children (an empty tree leaf), or intersection is not enabled, intersection always tests false (the node is intersectable by any type of intersector, but the intersection will always be false). If this node has a real target but no children (a non-empty tree leaf), intersection is true if the target is intersected. If this node has no real target but has children (an empty tree-branch), then intersection is true if any child is intersected. If this node has a real target and has children (a non-empty tree branch), then intersection is true if the target is intersected and, then, any child is intersected. For cases involving children, canIntersectGraphic() must test all intersectable children, but intersectGraphic() can quit after the first child tests true, so the order of the children may be important for efficiency.

Typically, intersectables are maintained in a space tree consisting of model geometry and bounds. An intersection tree can be separate from (extrinsic) or integrated into (intrinsic) such a tree. If extrinsic, the intersection tree topology can be simpler than that of the model, the intersection targets point to geometry in the model tree, and the model root node should forward its IntersectableGraphic interface to the intersection tree root node. If intrinsic, the model tree space nodes implement the intersection node interface, with the intersection target pointing to the node geometry and the space and intersection tree node delegates are the same.

Version:
$Revision: 1.10 $
Author:
Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.

Method Summary
 IntersectableGraphic getGraphicIntersectionTarget()
          Gets the intersection target of this intersection node.
 TreeNode getGraphicIntersectionTree()
          Gets the delegate tree node for this delegator's intersection tree.
 
Methods inherited from interface gumbo.graphic.probe.IntersectableGraphic
canIntersectGraphic, intersectGraphic
 
Methods inherited from interface gumbo.graphic.space.GraphicGeometry
getGraphicLocalSpace
 
Methods inherited from interface gumbo.graphic.Graphic
getGraphic
 

Method Detail

getGraphicIntersectionTarget

public IntersectableGraphic getGraphicIntersectionTarget()
Gets the intersection target of this intersection node.

Returns:
Reference to the target. Null if none, possibly this node.

getGraphicIntersectionTree

public TreeNode getGraphicIntersectionTree()
Gets the delegate tree node for this delegator's intersection tree.

Returns:
Reference to the delegate. Never null.