|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.pick.PickSupport
public class PickSupport
| Field Summary | |
|---|---|
protected int[] |
minAndMaxColorCodes
Indicates the minimum and maximum color code associated with the picked objects in the pickableObjects map. |
protected Map<Integer,PickedObject> |
pickableObjects
The picked objects currently registered with this PickSupport, represented as a map of color codes to picked objects. |
| Constructor Summary | |
|---|---|
PickSupport()
|
|
| Method Summary | |
|---|---|
void |
addPickableObject(int colorCode,
Object o)
|
void |
addPickableObject(int colorCode,
Object o,
Position position)
|
void |
addPickableObject(int colorCode,
Object o,
Position position,
boolean isTerrain)
|
void |
addPickableObject(PickedObject po)
|
protected void |
adjustExtremeColorCodes(int colorCode)
Adjust this PickSupport's minimum and maximum color codes by decreasing and increasing each extreme, respectively, according to the specified code. |
static boolean |
areSelectionsTheSame(PickedObject a,
PickedObject b)
Indicates whether two picked objects refer to the same user object. |
void |
beginPicking(DrawContext dc)
|
void |
clearPickList()
|
protected PickedObject |
doResolvePick(DrawContext dc,
Point pickPoint,
Layer layer)
Adds a picked object registered with this PickSupport that is drawn at the specified point in AWT screen coordinates (if one exists) to the draw context's list of picked objects. |
protected void |
doResolvePick(DrawContext dc,
Rectangle pickRect,
Layer layer)
Adds all picked objects that are registered with this PickSupport and intersect the specified rectangle in AWT screen coordinates (if any) to the draw context's list of picked objects. |
void |
endPicking(DrawContext dc)
|
protected Map<Integer,PickedObject> |
getPickableObjects()
|
int |
getTopColor(DrawContext dc,
Point pickPoint)
Returns the framebuffer RGB color for a point in AWT screen coordinates, formatted as a pick color code. |
PickedObject |
getTopObject(DrawContext dc,
Point pickPoint)
|
PickedObject |
resolvePick(DrawContext dc,
Point pickPoint,
Layer layer)
Adds picked object registered with this PickSupport that are drawn at the specified pick point or intersect the draw context's pick rectangle to the draw context's list of picked objects. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int[] minAndMaxColorCodes
null, indicating that the minimum and maximum color codes are unknown.
protected Map<Integer,PickedObject> pickableObjects
| Constructor Detail |
|---|
public PickSupport()
| Method Detail |
|---|
public void addPickableObject(int colorCode,
Object o)
public void addPickableObject(int colorCode,
Object o,
Position position)
public void addPickableObject(int colorCode,
Object o,
Position position,
boolean isTerrain)
public void addPickableObject(PickedObject po)
protected void adjustExtremeColorCodes(int colorCode)
colorCode - the code used to adjust the current min and max codes.
public static boolean areSelectionsTheSame(PickedObject a,
PickedObject b)
a - the first picked object.b - the second picked object.
public void beginPicking(DrawContext dc)
public void clearPickList()
protected PickedObject doResolvePick(DrawContext dc,
Point pickPoint,
Layer layer)
dc - the draw context which receives the picked object.pickPoint - the point in AWT screen coordinates.layer - the layer associated with the picked object.
null if no picked object is drawn at the
specified point.
protected void doResolvePick(DrawContext dc,
Rectangle pickRect,
Layer layer)
dc - the draw context which receives the picked objects.pickRect - the rectangle in AWT screen coordinates.layer - the layer associated with the picked objects.public void endPicking(DrawContext dc)
protected Map<Integer,PickedObject> getPickableObjects()
public int getTopColor(DrawContext dc,
Point pickPoint)
null, if the point contains the clear color, or if the point is
outside the draw context's drawable area.
dc - the draw context to return a color for.pickPoint - the point to return a color for, in AWT screen coordinates.
public PickedObject getTopObject(DrawContext dc,
Point pickPoint)
public PickedObject resolvePick(DrawContext dc,
Point pickPoint,
Layer layer)
null, this ignores the pick point and does not attempt to determine which
picked objects are drawn there. If the draw context's pick rectangle is null, this ignores the pick
rectangle and does not attempt to determine which picked objects intersect it. This does nothing if no picked
objects are currently registered with this PickSupport.
dc - the draw context which receives the picked object.pickPoint - the point in AWT screen coordinates.layer - the layer associated with the picked object.
null if no picked object is drawn at the
specified point.
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||