|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--jv.project.PvPickEvent
Pick events on geometries sent to a pick listener from a display.
PvPickListenerIf,
PjProject,
PvDisplayIf| Constructor Summary | |
PvPickEvent(int dim)
Constructor with dimension of scene in display. |
|
| Method Summary | |
PdBary |
getBary()
Get barycentric coordinates inside the picked element. |
int |
getDimOfVertex()
Get dimension of scene position of cursor in world coordinate of scene in display. |
double |
getDistance()
Get distance of picked vertex to nearest position on geometry. |
int |
getElementInd()
Get index of element in element array of picked geometry. |
int |
getElementSubInd()
Get the index of a subtringle if element has more than three edges. |
int |
getElemInd()
Deprecated: use #getElementInd() which provides the same functionality. |
PgGeometryIf |
getGeometry()
Get the picked geometry, may be null.
|
java.awt.Point |
getLocation()
Get position of cursor in pixel coordinates of drawing canvas of event. |
PiVector |
getMarkBox()
Get bounds of user dragged rectangle with four components in pixel coordinates. |
PdVector[] |
getMarkBoxWorld()
Get bounds of user dragged rectangle with four components converted to world-coordinates. |
PdVector |
getNormal()
Get normal vector at picked surface points. |
PvDisplayIf |
getSource()
Get source display where this event occurred. |
PdVector |
getVertex()
Get the point on the geometry nearest to the picked vertex, i.e. the intersection of the pick ray (viewBase,viewDir) with the geometry. |
int |
getVertexInd()
Get index of vertex in vertex array of picked geometry if pick was close to a vertex. |
PdVector |
getVertexNearest()
Deprecated. use getVertex() |
PdVector |
getViewBase()
Get position of cursor in world coordinate of scene in display. |
PdVector |
getViewDir()
Get normalized viewing direction as the vector pointing from the camera to its interest. |
void |
set(PdVector pos,
int elemInd,
int elemSubInd,
PdBary bary)
Convenient method to assign the four parameters of an event simultaneously. |
void |
setBary(PdBary bary)
Set barycentric coordinates inside the picked element. |
void |
setDistance(double dist)
Set distance of picked vertex to nearest position on geometry. |
void |
setElementInd(int elem)
Set index of element in element array of picked geometry. |
void |
setElementSubInd(int elemSub)
Set the index of a subtringle if element has more than three edges. |
void |
setGeometry(PgGeometryIf geom)
Set the picked geometry from display, may be null.
|
void |
setLocation(java.awt.Point pos)
Set position of cursor in pixel coordinates of drawing canvas of event. |
void |
setMarkBox(PiVector box)
Set bounds of user dragged rectangle with four components in pixel coordinates. |
void |
setMarkBoxWorld(PdVector[] box)
Set bounds of user dragged rectangle with four components in world-coordinates. |
void |
setNormal(PdVector normal)
Get normal vector at picked surface points. |
void |
setSource(PvDisplayIf disp)
Set source display where this event occurred. |
void |
setVertex(PdVector vertex)
Set the point on the geometry nearest to the picked vertex, i.e. the intersection of the pick ray (viewBase,viewDir) with the geometry. |
void |
setVertexInd(int ind)
Set index of vertex in vertex array of picked geometry if pick was close to a vertex. |
void |
setVertexNearest(PdVector vertex)
Deprecated. use setVertex(PdVector) |
void |
setViewBase(PdVector base)
Set position of cursor in world coordinate of scene in display. |
void |
setViewDir(PdVector pos)
Set viewing direction as the vector pointing from the camera to its interest. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PvPickEvent(int dim)
dim - Dimension of scene in display| Method Detail |
public PvDisplayIf getSource()
public void setSource(PvDisplayIf disp)
display - where this event occurredpublic int getDimOfVertex()
public PgGeometryIf getGeometry()
null.
A geometry must be the active geometry to receive a pick event.
Return value may be null.public void setGeometry(PgGeometryIf geom)
null.
A geometry must be the active geometry to receive a pick event.picked - geometrypublic PiVector getMarkBox()
null.public void setMarkBox(PiVector box)
lower - left and upper right corner of dragged rectangle in pixel coordinatespublic PdVector[] getMarkBoxWorld()
null.public void setMarkBoxWorld(PdVector[] box)
lower - left and upper right corner of dragged rectangle in world-coordinatespublic java.awt.Point getLocation()
public void setLocation(java.awt.Point pos)
Location - of mouse cursor in 2d pixel coordinatespublic PdVector getVertex()
getViewBase(),
getViewDir()public void setVertex(PdVector vertex)
World - coordinates of the nearest point on the geometry.setViewBase(jv.vecmath.PdVector),
setViewDir(jv.vecmath.PdVector)public PdVector getVertexNearest()
null.public void setVertexNearest(PdVector vertex)
World - coordinates of the nearest point on the geometry.public int getVertexInd()
public void setVertexInd(int ind)
index - of a vertexpublic double getDistance()
public void setDistance(double dist)
distance - of picked vertex to nearest position on geometry.public PdVector getNormal()
null.public void setNormal(PdVector normal)
World - coordinates of normal vector in scene.public PdBary getBary()
null.#getElemSubIndpublic void setBary(PdBary bary)
#getElemSubIndpublic int getElementInd()
public int getElemInd()
public void setElementInd(int elem)
index - of elementpublic int getElementSubInd()
public void setElementSubInd(int elemSub)
public PdVector getViewBase()
null.getVertex(),
getViewDir()public void setViewBase(PdVector base)
World - coordinates of mouse position in scene.setViewDir(jv.vecmath.PdVector)public PdVector getViewDir()
public void setViewDir(PdVector pos)
viewing - direction in world coordinates
public void set(PdVector pos,
int elemInd,
int elemSubInd,
PdBary bary)
coordinates - of picked vertexindex - of picked elementindex - of sub elementbarycentric - coordinates inside an element
|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||