public class SignedDistanceGridCell extends java.lang.Object implements GLSelectable
TRANSLUCENT, TWO_DIMENSIONAL
Constructor and Description |
---|
SignedDistanceGridCell() |
SignedDistanceGridCell(int idx,
SignedDistanceGrid grid) |
Modifier and Type | Method and Description |
---|---|
double |
getDistance() |
int[] |
getPoint() |
int |
getRenderHints()
Returns a bit code giving rendering hints about this renderable.
|
void |
getSelection(java.util.LinkedList<java.lang.Object> list,
int qid)
Append to
list the component (or components) associated with
the qid -th selection query issued by this component's render
method. |
boolean |
isSelectable()
Returns true if this object is in fact selectable.
|
boolean |
isSelected() |
int |
numSelectionQueriesNeeded()
If this selectable manages its own selection (by issuing selection
queries within its
render method), then this method should
return the maximum number of selection queries that will be
required. |
void |
prerender(RenderList list)
Prepare for rendering, and potentially add itself to a list to be drawn
by a GLRenderer.
|
void |
render(GLRenderer renderer,
int flags)
Render this object using Open GL via the JOGL.
|
void |
selectPoint(boolean selected) |
void |
setColour(float r,
float g,
float b) |
void |
setDistance(double d) |
void |
setIndex(int index) |
void |
setVertex(int x,
int y,
int z) |
void |
updateBounds(Point3d pmin,
Point3d pmax)
Update the minimum and maximum points for this object.
|
public SignedDistanceGridCell()
public SignedDistanceGridCell(int idx, SignedDistanceGrid grid)
public void setVertex(int x, int y, int z)
public void setDistance(double d)
public double getDistance()
public void setIndex(int index)
public void prerender(RenderList list)
GLRenderable
prerender
in interface GLRenderable
public void render(GLRenderer renderer, int flags)
GLRenderable
render
in interface GLRenderable
renderer
- renderer object which is used to perform the rendering. Provides pointers
to GL and GLU, along with helper functions.flags
- supplies flags that may be used to control different
aspects of the rendering. Flags are defined in GLRenderer
and currently include
GLRenderer.SELECTED
,
GLRenderer.VERTEX_COLORING
,
GLRenderer.HSV_COLOR_INTERPOLATION
,
GLRenderer.SORT_FACES
, and
GLRenderer.CLEAR_MESH_DISPLAY_LISTS
.public void getSelection(java.util.LinkedList<java.lang.Object> list, int qid)
GLSelectable
list
the component (or components) associated with
the qid
-th selection query issued by this component's render
method. This will only be called if this component manages its own
selection (i.e., the number nums
returned by GLSelectable.numSelectionQueriesNeeded()
is positive), and qid
will in
turn be a number between 0 and nums
-1.getSelection
in interface GLSelectable
list
- selected objects are appended to the end of this listqid
- index of the selection querypublic boolean isSelectable()
GLSelectable
isSelectable
in interface GLSelectable
public int numSelectionQueriesNeeded()
GLSelectable
render
method), then this method should
return the maximum number of selection queries that will be
required. Otherwise, this method should return -1.numSelectionQueriesNeeded
in interface GLSelectable
public boolean isSelected()
public void selectPoint(boolean selected)
public int[] getPoint()
public int getRenderHints()
GLRenderable
TRANSLUCENT
.getRenderHints
in interface GLRenderable
public void setColour(float r, float g, float b)
public void updateBounds(Point3d pmin, Point3d pmax)
GLRenderable
updateBounds
in interface GLRenderable
pmin
- minimum pointpmax
- maximum point