|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This interface must be implemented by all cameras.
| Method Summary | |
double |
getDist()
Get distance of camera position from point of interest in world coordinates. |
PdVector |
getInterest()
Get position at which camera is directed, i.e. the point of interest. |
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. |
PdVector |
getUpVector()
Get up vector as second row of viewing matrix divided by scaling factor. |
PdVector |
getViewDir()
Get normalized viewing direction which is the vector pointing from the camera to its interest. |
void |
setDist(double newDist)
Set distance of camera position from point of interest in world coordinates. |
void |
setInterest(PdVector pos)
Set position at which camera is directed, i.e. the point of interest. |
void |
setPosition(PdVector pos)
Set position of camera in world coordinates. |
void |
setRoll(double roll)
Set angle which camera is rotated around viewing direction against default position. |
void |
setScale(double newScale)
Set zoom factor of camera. |
void |
setUpVector(PdVector up)
Set normalized up vector of camera in world coordinates. |
void |
setViewDir(PdVector pos)
Set viewing direction as the vector pointing from the camera to its interest. |
| Method Detail |
public int getProjectionMode()
PvDisplayIf#CAMERA_ORTHO_XY.PvDisplayIfpublic PdVector getViewDir()
public void setViewDir(PdVector pos)
viewing - direction in world coordinatespublic double getDist()
getScale()public void setDist(double newDist)
factor=newDist/currDist.distance - of camera to interest in world coordinates.setScale(double)public double getScale()
getDist()public void setScale(double newScale)
zoom - factor of camera.setDist(double)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 void setRoll(double roll)
angle - in (-pi,pi)getRoll()public PdVector getInterest()
interest = viewInv[.][3]
public void setInterest(PdVector pos)
pos - 3d-coordinates of interest in world coordinates.public PdVector getPosition()
position = interest - dist*viewDir.
public void setPosition(PdVector pos)
position = interest - dist*viewDir.
pos - 3d-position of camera in world coordinates.public PdVector getUpVector()
upDir = -view[1][.] / getScale().
public void setUpVector(PdVector up)
normalized - up vector of camera in world coordinates.
|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||