edu.washington.NVisF.plotter
Class PointCloudStrategy

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

public class PointCloudStrategy
extends PlotStrategy

A PointCloudStrategy defines a strategy for representing 3D data as a single 3D visualization object where each data object is rendered as a single pixel. Several component Strategies provide pieces that are assembled into the 3D object. A PositionStrategy and Appearance Strategy must be defined (and cannot be null), but the other Strategies are optional. The 3D object constructed is then wrapped in an ObjectGroup object that is returned to the caller.

See Also:
PositionStrategy, ColoringStrategy, AlphaColoringStrategy, AppearanceStrategy, PointArray

Constructor Summary
PointCloudStrategy()
          Constructs a simple PointCloudStrategy with a default PositionStrategy and AppearanceStrategy.
PointCloudStrategy(PositionStrategy positionStrategy, ColoringStrategy coloringStrategy, AlphaColoringStrategy alphaColoringStrategy, AppearanceStrategy appearanceStrategy)
          Constructs a PointCloudStrategy that will use the specified components for its positions, colors, alpha values, and Appearance.
PointCloudStrategy(PositionStrategy positionStrategy, ColoringStrategy coloringStrategy, AppearanceStrategy appearanceStrategy)
          Constructs a PointCloudStrategy that will use the specified components for its positions, colors, and Appearance.
 
Method Summary
 AlphaColoringStrategy getAlphaColoringStrategy()
          returns the AlphaColoringStrategy that provides alpha values for this PlotStrategy.
 Appearance getAppearance(PlotCommand command)
          returns an Appearance object appropriate to the given PlotCommand.
 AppearanceStrategy getAppearanceStrategy()
          returns the AppearanceStrategy that provides Appearance objects for this PlotStrategy.
 ColoringStrategy getColoringStrategy()
          returns the ColoringStrategy that provides colors for this PlotStrategy.
 GeometryArray[] getGeometryArrays(PlotCommand command)
          builds the GeometryArray[] for the specified PlotCommand.
 PositionStrategy getPositionStrategy()
          returns the PositionStrategy that provides coordinates for this PlotStrategy.
 int getVertexFormat()
          returns the vertexFormat used to construct the GeometryArray.
 void setAlphaColoringStrategy(AlphaColoringStrategy alphaColoringStrategy)
          setss the AlphaColoringStrategy that provides alpha values for this PlotStrategy.
 void setAppearanceStrategy(AppearanceStrategy appearanceStrategy)
          sets the AppearanceStrategy that provides Appearance objects for this PlotStrategy.
 void setColoringStrategy(ColoringStrategy coloringStrategy)
          sets the ColoringStrategy that provides colors for this PlotStrategy.
 void setPositionStrategy(PositionStrategy positionStrategy)
          sets the PositionStrategy that provides coordinates for this PlotStrategy.
 void setVertexFormat(int format)
          sets the vertexFormat used to construct the GeometryArray.
 
Methods inherited from class edu.washington.NVisF.plotter.PlotStrategy
getShape3Ds, getShape3Ds, getShape3Ds
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointCloudStrategy

public PointCloudStrategy()
Constructs a simple PointCloudStrategy with a default PositionStrategy and AppearanceStrategy.

PointCloudStrategy

public PointCloudStrategy(PositionStrategy positionStrategy,
                          ColoringStrategy coloringStrategy,
                          AppearanceStrategy appearanceStrategy)
Constructs a PointCloudStrategy that will use the specified components for its positions, colors, and Appearance. It will use ordinary (Color3f) colors.
Throws:
NullPointerException - if either positionStrategy or appearanceStrategy is null

PointCloudStrategy

public PointCloudStrategy(PositionStrategy positionStrategy,
                          ColoringStrategy coloringStrategy,
                          AlphaColoringStrategy alphaColoringStrategy,
                          AppearanceStrategy appearanceStrategy)
Constructs a PointCloudStrategy that will use the specified components for its positions, colors, alpha values, and Appearance. It will use colors with alpha values (Color4f).
Throws:
NullPointerException - if either positionStrategy or appearanceStrategy is null
Method Detail

getAppearance

public Appearance getAppearance(PlotCommand command)
returns an Appearance object appropriate to the given PlotCommand.
Overrides:
getAppearance in class PlotStrategy

getGeometryArrays

public GeometryArray[] getGeometryArrays(PlotCommand command)
builds the GeometryArray[] for the specified PlotCommand. Positions, colors, and alpha values are provided by the appropriate components if available. The vertex format for the GemetryArray objects is taken from the most recent setVertexFormat(int) method call, which is also called from the constructors.
Overrides:
getGeometryArrays in class PlotStrategy
Throws:
NullPointerException - if no positions are available to construct the GeometryArrays
See Also:
GeometryArray

getVertexFormat

public int getVertexFormat()
returns the vertexFormat used to construct the GeometryArray. See the GeometryArray class for a definition of this format.

setVertexFormat

public void setVertexFormat(int format)
sets the vertexFormat used to construct the GeometryArray. See the GeometryArray class for a definition of this format.

getPositionStrategy

public PositionStrategy getPositionStrategy()
returns the PositionStrategy that provides coordinates for this PlotStrategy.

setPositionStrategy

public void setPositionStrategy(PositionStrategy positionStrategy)
sets the PositionStrategy that provides coordinates for this PlotStrategy.
Throws:
NullPointerException - if the supplied argument is null

getColoringStrategy

public ColoringStrategy getColoringStrategy()
returns the ColoringStrategy that provides colors for this PlotStrategy.

setColoringStrategy

public void setColoringStrategy(ColoringStrategy coloringStrategy)
sets the ColoringStrategy that provides colors for this PlotStrategy.

getAlphaColoringStrategy

public AlphaColoringStrategy getAlphaColoringStrategy()
returns the AlphaColoringStrategy that provides alpha values for this PlotStrategy.

setAlphaColoringStrategy

public void setAlphaColoringStrategy(AlphaColoringStrategy alphaColoringStrategy)
setss the AlphaColoringStrategy that provides alpha values for this PlotStrategy.

getAppearanceStrategy

public AppearanceStrategy getAppearanceStrategy()
returns the AppearanceStrategy that provides Appearance objects for this PlotStrategy.

setAppearanceStrategy

public void setAppearanceStrategy(AppearanceStrategy appearanceStrategy)
sets the AppearanceStrategy that provides Appearance objects for this PlotStrategy.
Throws:
NullPointerException - if the supplied argument is null