|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsim.portrayal3d.grid.quad.QuadPortrayal
public abstract class QuadPortrayal
A QuadPortrayal is the abstract superclass of objects which describe how rectangles in a in a ValueGrid2DPortrayal3D are associated with the underlying ValueGrid2D. These objects are not true Portrayal3D objects: they can only be used with ValueGrid2DPortrayal3D.
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 | |
---|---|
static class |
QuadPortrayal.DoubleFilter
|
static class |
QuadPortrayal.Filter
|
static class |
QuadPortrayal.IntFilter
|
Field Summary | |
---|---|
ColorMap |
colorDispenser
Our color map for values |
float |
zScale
How much we move the quad up or down for a given value. |
Constructor Summary | |
---|---|
QuadPortrayal(ColorMap colorDispenser,
float zScale)
|
Method Summary | |
---|---|
Int2D |
getCellForIntersection(com.sun.j3d.utils.picking.PickIntersection pi,
Grid2D field)
|
Inspector |
getInspector(LocationWrapper wrapper,
GUIState state)
Provide an inspector for an object. |
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. |
abstract void |
setData(ValueGridCellInfo gridCell,
float[] coordinates,
float[] colors,
int quadIndex,
int gridWidth,
int gridHeight)
|
boolean |
setSelected(LocationWrapper wrapper,
boolean selected)
Change the portrayal state to reflect the fact that you've been selected or not selected. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public float zScale
public ColorMap colorDispenser
Constructor Detail |
---|
public QuadPortrayal(ColorMap colorDispenser, float zScale)
Method Detail |
---|
public abstract void setData(ValueGridCellInfo gridCell, float[] coordinates, float[] colors, int quadIndex, int gridWidth, int gridHeight)
public java.lang.String getStatus(LocationWrapper wrapper)
Portrayal
getStatus
in interface Portrayal
public java.lang.String getName(LocationWrapper wrapper)
Portrayal
getName
in interface 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
public Int2D getCellForIntersection(com.sun.j3d.utils.picking.PickIntersection pi, Grid2D field)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |