public abstract class QuadPortrayal extends java.lang.Object implements Portrayal
There are two standard subclasses: TilePortrayal represents objects as squares on the grid. MeshPortrayal represents objects as the *intersections* of the grid lines.
QuadPortrayals may be associated with a zScale, indicating the degree to which the value effects the "height" of the rectangle. In TilePortrayal, different "heights" result in stair-step effects. In MeshsPortrayal, different "heights" result in a mountainscape.
QuadPortrayals are also associated with a colorDispenser which specifies the color of the ValueGrid2D point, just as in ValueGridPortrayal2D.
Bug in MeshPortrayal. It appears that if values in MeshPortrayals cause "bends" in the angle of the underlying squares that are too severe (we've seen over 45 degrees), then when Java3D tries to pick the square you've double-clicked on, the "bent" squares will insist on being included in the pick collection. We believe this to be a bug in Sun's Java3D code. You'll see this happen when you double-click on a MeshPortrayal and the wrong-coordinate object pops up.
Modifier and Type | Class and Description |
---|---|
static class |
QuadPortrayal.DoubleFilter |
static class |
QuadPortrayal.Filter |
static class |
QuadPortrayal.IntFilter |
static class |
QuadPortrayal.ObjectFilter |
Constructor and Description |
---|
QuadPortrayal(ColorMap colorDispenser,
double zScale) |
Modifier and Type | Method and Description |
---|---|
Int2D |
getCellForIntersection(com.sun.j3d.utils.picking.PickIntersection pi,
Grid2D field) |
Inspector |
getInspector(LocationWrapper wrapper,
GUIState state)
Provide an inspector for an object.
|
ColorMap |
getMap() |
java.lang.String |
getName(LocationWrapper wrapper)
Returns a static, one-line name for the given object that is useful for a human
to distinguish it from other objects.
|
java.lang.String |
getStatus(LocationWrapper wrapper)
Returns a simple, informative one-line description of the current status of the object,
which may change at any time to reflect how the object is changing.
|
double |
getZScale() |
abstract void |
setData(ValueGridCellInfo gridCell,
float[] coordinates,
float[] colors,
int quadIndex,
int gridWidth,
int gridHeight) |
void |
setMap(ColorMap map) |
boolean |
setSelected(LocationWrapper wrapper,
boolean selected)
Change the portrayal state to reflect the fact that you've
been selected or not selected.
|
void |
setZScale(double scale) |
public QuadPortrayal(ColorMap colorDispenser, double zScale)
public ColorMap getMap()
public void setMap(ColorMap map)
public double getZScale()
public void setZScale(double scale)
public abstract void setData(ValueGridCellInfo gridCell, float[] coordinates, float[] colors, int quadIndex, int gridWidth, int gridHeight)
public java.lang.String getStatus(LocationWrapper wrapper)
Portrayal
public java.lang.String getName(LocationWrapper wrapper)
Portrayal
public boolean setSelected(LocationWrapper wrapper, boolean selected)
Portrayal
setSelected
in interface Portrayal
public Inspector getInspector(LocationWrapper wrapper, GUIState state)
Portrayal
getInspector
in interface Portrayal