|
JavaView® v2.00.008 | ||||||||
| 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| Field Summary | |
protected PdBary |
m_bary
Barycentric coordinates of point in m_elemInd, or, if m_subElemInd! |
protected int |
m_dim
Dimension of vertex in world coordinates. |
protected PvDisplayIf |
m_display
Display where pick event occurred. |
protected double |
m_dist
Distance of picked vertex to nearest position on geometry. |
protected int |
m_elemInd
Element in geometry in which point lies. |
protected int |
m_elemSubInd
If element has more than three vertices, then a subElement is specified. |
protected PgGeometryIf |
m_geom
Geometry of point |
protected java.awt.Point |
m_location
Position of cursor in pixel coordinates of drawing canvas. |
protected PiVector |
m_markBox
Rectangle on the screen marked by user. |
protected PdVector[] |
m_markBoxWorld
Set of vertices if user has selected a rectangular box on the screen. |
protected PdVector |
m_normal
Normal vector at picked surface points. |
protected PdVector |
m_vertex
Vertex representing the picked point, not a vertex of the geometry. |
protected int |
m_vertexInd
Index of vertex of geometry representing close to the picked point. |
protected PdVector |
m_vertexNearest
The position on the geometry which is nearest to the picked vertex. |
protected PdVector |
m_viewDir
Direction under which this point was hit by the viewing ray. |
| 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 position of cursor in world coordinate of scene in display. |
int |
getVertexInd()
Get index of vector in vertex array of picked geometry. |
PdVector |
getVertexNearest()
Get position of the point on the geometry nearest to the picked vertex. |
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 the four parameters of event simultanously. |
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 position of cursor in world coordinate of scene in display. |
void |
setVertexInd(int ind)
Set index of vector in vertex array of picked geometry. |
void |
setVertexNearest(PdVector vertexNearest)
Set position of the point on the geometry nearest to the picked vertex. |
void |
setViewDir(PdVector pos)
Set viewing direction as the vector pointing from the camera to its interest. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected PvDisplayIf m_display
protected PgGeometryIf m_geom
protected int m_dim
protected int m_vertexInd
protected PdVector m_vertex
protected PdVector m_vertexNearest
protected double m_dist
protected PdVector m_normal
protected PdBary m_bary
protected int m_elemInd
protected int m_elemSubInd
protected PdVector m_viewDir
protected java.awt.Point m_location
protected PiVector m_markBox
jv.project.PvPickListenerIf#markVertices()protected PdVector[] m_markBoxWorld
jv.project.PvPickListenerIf#markVertices()| 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()
null.public void setVertex(PdVector vertex)
World - coordinates of mouse position in scene.public PdVector getVertexNearest()
null.public void setVertexNearest(PdVector vertexNearest)
World - coordinates of the nearest point on the geometry.public int getVertexInd()
public void setVertexInd(int ind)
index - of 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 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.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||