edu.washington.NVisF.plotter
Class PlotStrategy

java.lang.Object
  |
  +--edu.washington.NVisF.plotter.PlotStrategy
Direct Known Subclasses:
LineCloudStrategy, PointCloudStrategy

public abstract class PlotStrategy
extends java.lang.Object

This is the abstract base class for all plot strategies. A PlotStrategy defines an algorithm for constructing a 3D object given the data available from the supplied PlotCommand. Various subclases provide definitions for creating different kinds of visualizations.


Constructor Summary
PlotStrategy()
           
 
Method Summary
 Appearance getAppearance(PlotCommand command)
          Returns an Appearance object appropriate for the supplied PlotCommand, according to the algorithm defined in this PlotStrategy.
abstract  GeometryArray[] getGeometryArrays(PlotCommand command)
          Returns an array of GeometryArray objects containing the geometry component of the 3D representation of the data defined in the supplied PlotCommand, according to the algorithm defined in this PlotStrategy.
 Shape3D[] getShape3Ds(GeometryArray[] gArrays, Appearance appearance)
          Returns an array of Shape3D objects contrusted from the provided array of geometry objects and the provided Appearance object.
 Shape3D[] getShape3Ds(PlotCommand command)
          Returns an array of Shape3D objects containing the 3D representation of the data defined in the supplied PlotCommand by combining the results of the getGeometryArrays(edu.washington.NVisF.plotter.PlotCommand) and getAppearance(edu.washington.NVisF.plotter.PlotCommand) methods.
 Shape3D[] getShape3Ds(PlotCommand command, GeometryArray[] gArrays)
          Returns an array of Shape3D objects constructed from the provided array of GeometryArray objects by adding an Appearance object from the getAppearance(edu.washington.NVisF.plotter.PlotCommand) method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlotStrategy

public PlotStrategy()
Method Detail

getShape3Ds

public Shape3D[] getShape3Ds(PlotCommand command)
Returns an array of Shape3D objects containing the 3D representation of the data defined in the supplied PlotCommand by combining the results of the getGeometryArrays(edu.washington.NVisF.plotter.PlotCommand) and getAppearance(edu.washington.NVisF.plotter.PlotCommand) methods.
Throws:
NullPointerException - if command is null, or if a submethod produces an unexpected null

getShape3Ds

public Shape3D[] getShape3Ds(PlotCommand command,
                             GeometryArray[] gArrays)
Returns an array of Shape3D objects constructed from the provided array of GeometryArray objects by adding an Appearance object from the getAppearance(edu.washington.NVisF.plotter.PlotCommand) method.

getShape3Ds

public Shape3D[] getShape3Ds(GeometryArray[] gArrays,
                             Appearance appearance)
Returns an array of Shape3D objects contrusted from the provided array of geometry objects and the provided Appearance object.

getGeometryArrays

public abstract GeometryArray[] getGeometryArrays(PlotCommand command)
Returns an array of GeometryArray objects containing the geometry component of the 3D representation of the data defined in the supplied PlotCommand, according to the algorithm defined in this PlotStrategy.
Throws:
NullPointerException - if command is null, or if a submethod produces an unexpected null

getAppearance

public Appearance getAppearance(PlotCommand command)
Returns an Appearance object appropriate for the supplied PlotCommand, according to the algorithm defined in this PlotStrategy. The default implementation returns a generic Appearance object constructed with no arguments.