Class QuadPortrayal
- All Implemented Interfaces:
Portrayal
- Direct Known Subclasses:
MeshPortrayal
,TilePortrayal
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.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCellForIntersection
(com.sun.j3d.utils.picking.PickIntersection pi, Grid2D field) getInspector
(LocationWrapper wrapper, GUIState state) Provide an inspector for an object.getMap()
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.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
abstract void
setData
(ValueGridCellInfo gridCell, float[] coordinates, float[] colors, int quadIndex, int gridWidth, int gridHeight) void
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)
-
Constructor Details
-
QuadPortrayal
-
-
Method Details
-
getMap
-
setMap
-
getZScale
public double getZScale() -
setZScale
public void setZScale(double scale) -
setData
public abstract void setData(ValueGridCellInfo gridCell, float[] coordinates, float[] colors, int quadIndex, int gridWidth, int gridHeight) -
getStatus
Description copied from interface:Portrayal
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. A simple default would be just to return getName(wrapper). -
getName
Description copied from interface:Portrayal
Returns a static, one-line name for the given object that is useful for a human to distinguish it from other objects. A simple default would be just to return "" + object. -
setSelected
Description copied from interface:Portrayal
Change the portrayal state to reflect the fact that you've been selected or not selected. Always return true, except if you've received a setSelected(true) and in fact do not wish to be selectable, in which case return false in that sole situation.- Specified by:
setSelected
in interfacePortrayal
-
getInspector
Description copied from interface:Portrayal
Provide an inspector for an object.- Specified by:
getInspector
in interfacePortrayal
-
getCellForIntersection
-