|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmr3d.visualization.CentralProjectionCamera
Projects 3D-points to a defined 2-dimensional view plane. The results are stored in the 3D-point objects x2d and y2d class variables.
| Field Summary | |
private static Vector3D |
cameraPosition
Position of the camera in world coordinates. |
(package private) static int |
chi
Amount of degrees the camera is rotated relative to the world-coordinate-system. |
(package private) static int |
displayCenterX
X-value of the center of the display in display coordinates. |
(package private) static int |
displayCenterY
Y-value of the center of the display in display coordinates. |
static int |
displayHeight
Display height in pixel. |
static int |
displayWidth
Display width in pixel. |
(package private) static int |
omega
Amount of degrees the camera is rotated relative to the world-coordinate-system. |
(package private) static int |
psi
Amount of degrees the camera is rotated relative to the world-coordinate-system. |
private static boolean |
recalculate
Status variable. |
private Matrix |
rotMatrixWCStoCCS
Rotation matrix for one part of the world to camera-coordinate conversion. |
static int |
viewPlaneDistance
Distance of the projection reference point (prp) to the view plane. |
private static int |
viewVolumeFactorX
Constant to calculate the view volume boundaries in the direction of x. |
private static int |
viewVolumeFactorY
Constant to calculate the view volume boundaries in the direction of y. |
| Constructor Summary | |
CentralProjectionCamera()
Creates a new camera object. |
|
| Method Summary | |
private void |
calculateViewVolumeFactors()
Calculates the view volume factors. |
Vector3D |
getAngles()
Returns the rotation of the camera-coordinate system relative to the world-coordinate system as 3d vector |
Vector3D |
getPosition()
Returns the current position of the camera. |
boolean |
inViewVolume(Vector3D coords)
Determines if the object is in the approximate view volume. |
void |
move(int x,
int y,
int z)
Moves the center of the view plane relative to its current position in world coordinates. |
void |
moveTo(int x,
int y,
int z)
Moves the center of the view plane to the specified point in world coordinates. |
void |
rotate(int addChi,
int addPsi,
int addOmega)
Rotates the camera coordinate system relative to its current rotation. |
void |
setAngles(int chiX,
int psiY,
int omegaZ)
Sets the rotation of the camera coordinate system relative to the world coordinate system. |
void |
setDisplayDimensions(int width,
int height)
Sets the display dimensions. |
void |
setViewPlaneDistance(int vpd)
Sets the view plane distance to the specified value. |
void |
transformWCStoDCS()
Performs a world-coordinate to display-coordinate transformation with all points in the PAT. |
Point3D |
transformWCStoDCS(Point3D projector)
Performs a world-coordinate to display-coordinate transformation with the specified point. |
void |
transformWCStoDCS(TriangleBased3DObject obj)
Performs a world-coordinate to display-coordinate transformation with all points in the specified 3d-object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static Vector3D cameraPosition
static int chi
static int displayCenterX
static int displayCenterY
public static int displayHeight
public static int displayWidth
static int omega
static int psi
private static boolean recalculate
private Matrix rotMatrixWCStoCCS
public static int viewPlaneDistance
private static int viewVolumeFactorX
private static int viewVolumeFactorY
| Constructor Detail |
public CentralProjectionCamera()
| Method Detail |
private void calculateViewVolumeFactors()
public Vector3D getAngles()
public Vector3D getPosition()
public boolean inViewVolume(Vector3D coords)
coords - coordinate vector to be tested
public void move(int x,
int y,
int z)
x - x the value to be added to the camera positiony - y the value to be added to the camera positionz - z the value to be added to the camera position
public void moveTo(int x,
int y,
int z)
x - x value of the new camera positiony - y value of the new camera positionz - z value of the new camera position
public void rotate(int addChi,
int addPsi,
int addOmega)
addChi - the value to be added to the chi-angleaddPsi - the value to be added to the psi-angleaddOmega - the value to be added to the omega-angle
public void setAngles(int chiX,
int psiY,
int omegaZ)
chiX - new rotation abgle about x-axispsiY - new rotation abgle about y-axisomegaZ - new rotation abgle about z-axis
public void setDisplayDimensions(int width,
int height)
width - width of the display in pixelheight - height of the display in pixelpublic void setViewPlaneDistance(int vpd)
vpd - new view plane distancepublic void transformWCStoDCS()
public Point3D transformWCStoDCS(Point3D projector)
projector - point to be projected on the view planepublic void transformWCStoDCS(TriangleBased3DObject obj)
obj - 3d-object to be projected on the view plane
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||