|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface must be implemented by all cameras.
| Field Summary | |
static int |
CAMERA_MODEL
Misused camera type in display, simulates transformation of modeling matrix of geometry. |
static java.lang.String[] |
CAMERA_NAME
Array of camera names. |
static int |
CAMERA_ORTHO_XY
Camera type and projection mode projecting orthogonally onto xy-plane. |
static int |
CAMERA_ORTHO_XZ
Camera type and projection mode projecting orthogonally onto xz-plane. |
static int |
CAMERA_ORTHO_YZ
Camera type and projection mode projecting orthogonally onto yz-plane. |
static int |
CAMERA_PERSPECTIVE
Camera type and projection mode allowing to arbitrary rotate camera. |
| 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. |
PdMatrix |
getTransMatrix(int type)
Get transformation matrices PV, P, V and their inverses in current camera and display. |
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. |
boolean |
isEnabledSceneRatio()
Check of aspect ratio of scene bounding box is enabled. |
void |
saveAsDefault()
Save the current transformation matrices as default. |
void |
setBoxRatio(PdVector ratio)
Set the scaling factor for all three camera axis to produce a non-square viewing frustum. |
void |
setDist(double newDist)
Set distance of camera position from point of interest in world coordinates. |
void |
setEnabledBoxRatio(boolean flag)
Enable usage of a variable aspect ratio for the viewing frustum of this camera. |
void |
setEnabledClip(boolean flag)
Enable horizontal clipping. |
void |
setEnabledSceneRatio(boolean flag)
Set aspect ratio of scene bounding box. |
void |
setFarClip(double dist)
Get distance of far clipping plane. |
void |
setFieldOfView(double angle)
Set opening angle of camera. |
void |
setFullPosition(PdVector interest,
PdVector position,
PdVector upDir)
Set full orientation and location of camera in world coordinates. |
void |
setInterest(PdVector pos)
Set position at which camera is directed, i.e. the point of interest. |
void |
setName(java.lang.String name)
Set name of instance. |
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 |
setTransMatrix(int type,
PdMatrix mat)
Set transformation matrices PV, P, V and their inverses in current camera and display. |
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 |
| Field Detail |
public static final int CAMERA_PERSPECTIVE
public static final int CAMERA_ORTHO_XY
public static final int CAMERA_ORTHO_XZ
public static final int CAMERA_ORTHO_YZ
public static final int CAMERA_MODEL
public static final java.lang.String[] CAMERA_NAME
| Method Detail |
public void setName(java.lang.String name)
public void saveAsDefault()
public int getProjectionMode()
PvCameraIf#CAMERA_ORTHO_XY.
PvDisplayIfpublic void setProjectionMode(int mode)
PvCameraIf#CAMERA_ORTHO_XY.
mode - new projection modePvDisplayIfpublic PdVector getViewDir()
public void setViewDir(PdVector pos)
pos - viewing direction in world coordinatespublic double getDist()
getScale()public void setDist(double newDist)
factor=newDist/currDist.
newDist - distance of camera to interest in world coordinates.setScale(double)public double getScale()
getDist()public void setScale(double newScale)
newScale - zoom factor of camera.setDist(double)public double getFieldOfView()
setFieldOfView(double)public void setFieldOfView(double angle)
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)
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 void setFullPosition(PdVector interest,
PdVector position,
PdVector upDir)
position = interest - dist*viewDir.
UpDir must be orthogonal to the vector interest-position.
interest - 3d-coordinates of point of interest in world coordinates.position - 3d-coordinates of position of camera in world coordinates.upDir - normalized up vector of camera in world coordinates.public PdVector getUpVector()
upDir = -view[1][.] / getScale().
public void setUpVector(PdVector up)
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 boolean isEnabledSceneRatio()
public void setEnabledSceneRatio(boolean flag)
public void setEnabledBoxRatio(boolean flag)
public void setBoxRatio(PdVector ratio)
ratio - three scaling factors, default square has (1.,1.,1.).public void setFarClip(double dist)
dist - positive distance of the far clip planepublic PdMatrix getTransMatrix(int type)
Modeling matrix should be set in original geometry model.
type - type of transformation matrix, see PvDisplay.MATRIX_
public void setTransMatrix(int type,
PdMatrix mat)
Modeling matrix should be set in original geometry model.
type - type of transformation matrix, see PvDisplay.MATRIX_mat - new transformation matrix
|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||