Class iicm.utils3d.Camera
All Packages Class Hierarchy This Package Previous Next Index
Class iicm.utils3d.Camera
java.lang.Object
|
+----iicm.utils3d.Camera
- public class Camera
- extends Object
Camera - camera control
Copyright (c) 1996,97 IICM
-
orientation_
-
-
position_
-
-
Camera()
-
-
approachNormal(float[], float[], float)
- approach a surface normal vector.
-
approachPosition(float[], float, float)
- approach a target position.
-
interpolateViews(Camera, Camera, float)
- calculates a new camera position and orientation between the two viewpoints, defined
by the Cameras cam1 & cam2.
-
interpolateViews(float[], Quaternion, float[], Quaternion, float)
- calculates a new camera position and orientation between the two viewpoints, defined
by the two pairs of position and orientation.
-
levelize()
- make the Camera leveled with ground plane
-
printValues(PrintStream)
- print camera values
-
reset()
- reset the Camera to its default position/orientation
-
rotateXYcenter(float, float, float[])
- rotate horizontally and vertically about arbitrary center.
-
rotateXYposition(float, float)
- rotate horizontally and vertical around camera position.
-
setCamera(float, float, float, float)
- set Camera via GE3D
-
translateVec(float[])
- translate camera along a given vector
-
translateVP(float, float, float, float)
- translate camera parallel to viewing plane
-
untilt()
- untilt the Camera (up is (0, 1, 0))
-
viewingRay(float, float, float, float, float, float)
- get the viewing ray (for picking).
-
zoomOut(float)
- zoom (dolly) camera (away from viewing plane)
position_
protected float position_[]
orientation_
protected Quaternion orientation_
Camera
public Camera()
reset
public void reset()
- reset the Camera to its default position/orientation
levelize
public void levelize()
- make the Camera leveled with ground plane
untilt
public void untilt()
- untilt the Camera (up is (0, 1, 0))
setCamera
public void setCamera(float viewangle,
float winaspect,
float hither,
float yon)
- set Camera via GE3D
- Parameters:
- viewangle - vertical field of view
- winaspect - window aspect (width/height)
- hither - near clipping plane
- yon - far clipping plane
zoomOut
public void zoomOut(float f)
- zoom (dolly) camera (away from viewing plane)
translateVP
public void translateVP(float x,
float y,
float aspect,
float scale)
- translate camera parallel to viewing plane
translateVec
public void translateVec(float tran[])
- translate camera along a given vector
rotateXYposition
public void rotateXYposition(float l2r,
float t2b)
- rotate horizontally and vertical around camera position.
(angles given in radians)
rotateXYcenter
public void rotateXYcenter(float l2r,
float t2b,
float center[])
- rotate horizontally and vertically about arbitrary center.
(angles given in radians)
approachPosition
public void approachPosition(float poi[],
float ktran,
float hither)
- approach a target position. move a fraction of k of the distance
between current position and target position towards the target
(away from target if k < 0). do not go nearer to target than near
clipping plane hither.
approachNormal
public void approachNormal(float poi[],
float normal[],
float krot)
- approach a surface normal vector. adjust line of sight by a
fraction of k to approach the negative surface normal vector
(away from it if k < 0). normal must be normalized.
does not change camera tilt.
- See Also:
- interpolateViews
interpolateViews
public void interpolateViews(Camera cam1,
Camera cam2,
float t)
- calculates a new camera position and orientation between the two viewpoints, defined
by the Cameras cam1 & cam2.
interpolateViews
public void interpolateViews(float pos1[],
Quaternion or1,
float pos2[],
Quaternion or2,
float t)
- calculates a new camera position and orientation between the two viewpoints, defined
by the two pairs of position and orientation.
viewingRay
public Ray viewingRay(float fx,
float fy,
float viewangle,
float winaspect,
float near,
float far)
- get the viewing ray (for picking). direction is not normalized.
- Parameters:
- fx: - horicontal fraction (0 = left, 1 = right)
- fy: - vertical fraction (0 = bottom, 1 = top)
viewplane, winaspect, near, far clipping planes not managed by Camera itself (see #setCamera)
printValues
public void printValues(PrintStream os)
- print camera values
All Packages Class Hierarchy This Package Previous Next Index