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

Variable Index

 o orientation_
 o position_

Constructor Index

 o Camera()

Method Index

 o approachNormal(float[], float[], float)
approach a surface normal vector.
 o approachPosition(float[], float, float)
approach a target position.
 o interpolateViews(Camera, Camera, float)
calculates a new camera position and orientation between the two viewpoints, defined by the Cameras cam1 & cam2.
 o 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.
 o levelize()
make the Camera leveled with ground plane
 o printValues(PrintStream)
print camera values
 o reset()
reset the Camera to its default position/orientation
 o rotateXYcenter(float, float, float[])
rotate horizontally and vertically about arbitrary center.
 o rotateXYposition(float, float)
rotate horizontally and vertical around camera position.
 o setCamera(float, float, float, float)
set Camera via GE3D
 o translateVec(float[])
translate camera along a given vector
 o translateVP(float, float, float, float)
translate camera parallel to viewing plane
 o untilt()
untilt the Camera (up is (0, 1, 0))
 o viewingRay(float, float, float, float, float, float)
get the viewing ray (for picking).
 o zoomOut(float)
zoom (dolly) camera (away from viewing plane)

Variables

 o position_
  protected float position_[]
 o orientation_
  protected Quaternion orientation_

Constructors

 o Camera
  public Camera()

Methods

 o reset
  public void reset()
reset the Camera to its default position/orientation
 o levelize
  public void levelize()
make the Camera leveled with ground plane
 o untilt
  public void untilt()
untilt the Camera (up is (0, 1, 0))
 o 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
 o zoomOut
  public void zoomOut(float f)
zoom (dolly) camera (away from viewing plane)
 o translateVP
  public void translateVP(float x,
                          float y,
                          float aspect,
                          float scale)
translate camera parallel to viewing plane
 o translateVec
  public void translateVec(float tran[])
translate camera along a given vector
 o rotateXYposition
  public void rotateXYposition(float l2r,
                               float t2b)
rotate horizontally and vertical around camera position. (angles given in radians)
 o rotateXYcenter
  public void rotateXYcenter(float l2r,
                             float t2b,
                             float center[])
rotate horizontally and vertically about arbitrary center. (angles given in radians)
 o 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.
 o 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
 o 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.
 o 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.
 o 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)
 o printValues
  public void printValues(PrintStream os)
print camera values

All Packages  Class Hierarchy  This Package  Previous  Next  Index