|
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.PvCameraEvent
Information about camera whenever mouse position has changed to be sent to a listener from a display.
PvPickListenerIf,
PvCameraIf,
PvDisplayIf, Serialized Form| Field Summary | |
protected PvCameraIf |
m_camera
Current camera of display. |
protected int |
m_dim
Dimension of vertex in world coordinates. |
protected PvDisplayIf |
m_display
Display where pick event occurred. |
protected java.awt.Point |
m_location
Position of cursor in pixel coordinates of drawing canvas. |
protected PdVector |
m_vertex
Vertex representing a world point under the mouse position. |
| Constructor Summary | |
PvCameraEvent(PvDisplayIf disp,
int dim)
Constructor with dimension of scene shown in display, usually dim=3. |
|
| Method Summary | |
int |
getDimOfVertex()
Get dimension of scene position of cursor in world coordinate of scene in display. |
PdVector |
getInterest()
Get position at which camera is directed, i.e. the point of interest. |
java.awt.Point |
getLocation()
Get position of cursor in pixel coordinates of drawing canvas of event. |
PdVector |
getPosition()
Get position of camera in world coordinates. |
int |
getProjectionMode()
Get projection mode of the camera, for example, perspective, xy-projection etc. |
double |
getRoll()
Get angle which camera is rotated around viewing direction against default position. |
double |
getScale()
Get zoom factor of camera. |
PvDisplayIf |
getSource()
Get source display where this event occurred. |
PdVector |
getUpVector()
Get up vector as second row of viewing matrix divided by scaling factor. |
PdVector |
getVertex()
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 |
setCamera(PvCameraIf camera)
Assign current camera of display when this event occurred. |
void |
setLocation(java.awt.Point pos)
Set position of cursor in pixel coordinates of drawing canvas of event. |
void |
setVertex(PdVector vertex)
Set position of cursor in world coordinate of scene in display. |
| 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 PvCameraIf m_camera
protected java.awt.Point m_location
protected int m_dim
protected PdVector m_vertex
| Constructor Detail |
public PvCameraEvent(PvDisplayIf disp,
int dim)
disp - Display where this event occurreddim - Dimension of world coordinates in scene| Method Detail |
public PvDisplayIf getSource()
public int getDimOfVertex()
public java.awt.Point getLocation()
public void setLocation(java.awt.Point pos)
Location - of mouse cursor in 2d pixel coordinatespublic PdVector getVertex()
public void setVertex(PdVector vertex)
World - coordinates of mouse position in scene.public void setCamera(PvCameraIf camera)
camera - Active camera of display to be queried for information.public int getProjectionMode()
PvDisplayIf#CAMERA_ORTHO_XY.PvDisplayIfpublic double getScale()
public double getRoll()
Mathematically, the roll is the angle between the two planes p1=(viewDir, defaultUpVector) and p2=(viewDir, upVector). The defaultUpVector depends on the projection mode, in xy-projection mode we have defaultUpVector=(0,1,0) since camera look down the negative z-axis and the positiv y-axis is showing upward.
#setRoll(double)public PdVector getInterest()
public PdVector getPosition()
public PdVector getViewDir()
public PdVector getUpVector()
|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||