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_ orientation_
-  
  
-   position_ position_
-  
   
  -   Camera() Camera()
-  
   
  -   approachNormal(float[], float[], float) approachNormal(float[], float[], float)
-  approach a surface normal vector.
  
-   approachPosition(float[], float, float) approachPosition(float[], float, float)
-  approach a target position.
  
-   interpolateViews(Camera, Camera, float) 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) 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() levelize()
-  make the Camera leveled with ground plane
  
-   printValues(PrintStream) printValues(PrintStream)
-  print camera values
  
-   reset() reset()
-  reset the Camera to its default position/orientation
  
-   rotateXYcenter(float, float, float[]) rotateXYcenter(float, float, float[])
-  rotate horizontally and vertically about arbitrary center.
  
-   rotateXYposition(float, float) rotateXYposition(float, float)
-  rotate horizontally and vertical around camera position.
  
-   setCamera(float, float, float, float) setCamera(float, float, float, float)
-  set Camera via GE3D
  
-   translateVec(float[]) translateVec(float[])
-  translate camera along a given vector
  
-   translateVP(float, float, float, float) translateVP(float, float, float, float)
-  translate camera parallel to viewing plane
  
-   untilt() untilt()
-  untilt the Camera (up is (0, 1, 0))
  
-   viewingRay(float, float, float, float, float, float) viewingRay(float, float, float, float, float, float)
-  get the viewing ray (for picking).
  
-   zoomOut(float) zoomOut(float)
-  zoom (dolly) camera (away from viewing plane)
   
 position_
position_
  protected float position_[]
 orientation_
orientation_
  protected Quaternion orientation_
   
 Camera
Camera
  public Camera()
   
 reset
reset
  public void reset()
  -  reset the Camera to its default position/orientation
 levelize
levelize
  public void levelize()
  -  make the Camera leveled with ground plane
 untilt
untilt
  public void untilt()
  -  untilt the Camera (up is (0, 1, 0))
 setCamera
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
zoomOut
  public void zoomOut(float f)
  -  zoom (dolly) camera (away from viewing plane)
 translateVP
translateVP
  public void translateVP(float x,
                          float y,
                          float aspect,
                          float scale)
  -  translate camera parallel to viewing plane
 translateVec
translateVec
  public void translateVec(float tran[])
  -  translate camera along a given vector
 rotateXYposition
rotateXYposition
  public void rotateXYposition(float l2r,
                               float t2b)
  -  rotate horizontally and vertical around camera position.
(angles given in radians)
 rotateXYcenter
rotateXYcenter
  public void rotateXYcenter(float l2r,
                             float t2b,
                             float center[])
  -  rotate horizontally and vertically about arbitrary center.
(angles given in radians)
 approachPosition
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
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
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
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
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
printValues
  public void printValues(PrintStream os)
  -  print camera values
All Packages  Class Hierarchy  This Package  Previous  Next  Index