public class SignedDistanceGridCell extends java.lang.Object implements IsSelectable
TRANSPARENT, 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)
Called prior to rendering to allow this object to update the internal
state required for rendering (such as by caching rendering coordinates).
|
void |
render(Renderer renderer,
int flags)
Render this object using the functionality of the supplied
Renderer . |
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(Vector3d pmin,
Vector3d 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)
IsRenderable
list.addIfVisible (obj);
for each of the objects in question.prerender
in interface IsRenderable
list
- list of objects to be renderedpublic void render(Renderer renderer, int flags)
IsRenderable
Renderer
.render
in interface IsRenderable
renderer
- provides the functionality used to perform the rendering.flags
- flags that may be used to control different
aspects of the rendering. Flags are defined in Renderer
and currently include
Renderer.HIGHLIGHT
and
Renderer.SORT_FACES
.public void getSelection(java.util.LinkedList<java.lang.Object> list, int qid)
IsSelectable
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 IsSelectable.numSelectionQueriesNeeded()
is positive), and qid
will in
turn be a number between 0 and nums
-1.getSelection
in interface IsSelectable
list
- selected objects are appended to the end of this listqid
- index of the selection querypublic boolean isSelectable()
IsSelectable
isSelectable
in interface IsSelectable
public int numSelectionQueriesNeeded()
IsSelectable
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 IsSelectable
public boolean isSelected()
public void selectPoint(boolean selected)
public int[] getPoint()
public int getRenderHints()
IsRenderable
TRANSPARENT
and
TWO_DIMENSIONAL
.getRenderHints
in interface IsRenderable
public void setColour(float r, float g, float b)
public void updateBounds(Vector3d pmin, Vector3d pmax)
IsRenderable
updateBounds
in interface IsRenderable
pmin
- minimum pointpmax
- maximum point