|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjv.project.PvCameraEvent
Information about camera whenever mouse position has changed to be sent to a listener from a display.
PvPickListenerIf,
PvCameraIf,
PvDisplayIf,
Serialized Form| 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 |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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)
pos - Location of mouse cursor in 2d pixel coordinatespublic PdVector getVertex()
public void setVertex(PdVector vertex)
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()
PvCameraIf#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.
public PdVector getInterest()
public PdVector getPosition()
public PdVector getViewDir()
public PdVector getUpVector()
|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||