de.grogra.imp3d.ray2
Interface VolumeListener

All Known Implementing Classes:
AvoidIntersection, LightModel, Scanner

public interface VolumeListener

A VolumeListener is informed from a SceneVisitor about the mappings from graph objects to volumes via invocations of the method volumeCreated.

Author:
Ole Kniemeyer
See Also:
SceneVisitor

Method Summary
 void beginGroup(java.lang.Object object, boolean asNode)
          This method is invoked by a SceneVisitor when subsequent volumes shall be grouped into a single compound object.
 void endGroup()
          This method is invoked by a SceneVisitor when the current group ends.
 void volumeCreated(java.lang.Object object, boolean asNode, Volume volume)
          This method is invoked by a SceneVisitor when a volume is created as representation of the geometry of object.
 

Method Detail

beginGroup

void beginGroup(java.lang.Object object,
                boolean asNode)
This method is invoked by a SceneVisitor when subsequent volumes shall be grouped into a single compound object. The group extends until the corresponding invocation of endGroup(). These invocations may be nested, i.e., there may be groups within groups.

Each group starts at object in the graph. If object has a geometric representation itself, the corresponding invocation of volumeCreated(java.lang.Object, boolean, de.grogra.vecmath.geom.Volume) may be either immediately before of after beginGroup.

Parameters:
object - the object of the graph which represents the root of the group
asNode - is object a node or an edge?
See Also:
endGroup()

endGroup

void endGroup()
This method is invoked by a SceneVisitor when the current group ends.

See Also:
beginGroup(java.lang.Object, boolean)

volumeCreated

void volumeCreated(java.lang.Object object,
                   boolean asNode,
                   Volume volume)
This method is invoked by a SceneVisitor when a volume is created as representation of the geometry of object. By storing the information provided by the parameters, the link from graph objects (nodes and edges) to volumes can be established.

Parameters:
object - an object of the graph
asNode - is object a node or an edge?
volume - the volume which has been created as geometrical representation of object