|
JavaView® v2.12 | ||||||||
| 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. |
double |
getFarClip()
Get distance of the far clipping plane. |
double |
getFieldOfView()
Get opening angle of camera. |
PdVector |
getInterest()
Get position at which camera is directed, i.e. the point of interest. |
double |
getNearClip()
Get distance of the near clipping plane. |
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. |
boolean |
isEnabledClip()
Determine whether horizontal clipping is enabled. |
void |
setDist(double newDist)
Set distance of camera position from point of interest in world coordinates. |
void |
setEnabledClip(boolean flag)
Enable horizontal clipping. |
void |
setFarClip(double dist)
Get distance of far clipping plane. |
void |
setFieldOfView(double angle)
Set opening angle of camera. |
void |
setInterest(PdVector pos)
Set position at which camera is directed, i.e. the point of interest. |
void |
setNearClip(double dist)
Get distance of the near clipping plane. |
void |
setPosition(PdVector pos)
Set position of camera in world coordinates. |
void |
setProjectionMode(int mode)
Set projection mode of the camera, for example, perspective, xy-projection etc. |
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. |
| Methods inherited from interface jv.object.PsUpdateIf |
getFather, getName, setParent, update |
| Method Detail |
public int getProjectionMode()
PvDisplayIf#CAMERA_ORTHO_XY.PvDisplayIfpublic void setProjectionMode(int mode)
PvDisplayIf#CAMERA_ORTHO_XY.new - projection modePvDisplayIfpublic 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 getFieldOfView()
setFieldOfView(double)public void setFieldOfView(double angle)
angle - in (0,180)getFieldOfView()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.public boolean isEnabledClip()
public void setEnabledClip(boolean flag)
public double getNearClip()
public void setNearClip(double dist)
dist - positive distance of the near clip planepublic double getFarClip()
public void setFarClip(double dist)
dist - positive distance of the far clip plane
|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||