|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectiicm.utils3d.Camera
public class Camera
Camera - camera control Copyright (c) 1996,97 IICM
Field Summary | |
---|---|
protected Quaternion |
orientation_
|
protected float[] |
position_
|
(package private) static int |
X
|
(package private) static int |
Y
|
(package private) static int |
Z
|
Constructor Summary | |
---|---|
Camera()
|
Method Summary | |
---|---|
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. |
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. |
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. |
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. |
void |
levelize()
make the Camera leveled with ground plane |
void |
printValues(java.io.PrintStream os)
print camera values |
void |
reset()
reset the Camera to its default position/orientation |
void |
rotateXYcenter(float l2r,
float t2b,
float[] center)
rotate horizontally and vertically about arbitrary center. |
void |
rotateXYposition(float l2r,
float t2b)
rotate horizontally and vertical around camera position. |
void |
setCamera(float viewangle,
float winaspect,
float hither,
float yon)
set Camera via GE3D |
void |
translateVec(float[] tran)
translate camera along a given vector |
void |
translateVP(float x,
float y,
float aspect,
float scale)
translate camera parallel to viewing plane |
void |
untilt()
untilt the Camera (up is (0, 1, 0)) |
Ray |
viewingRay(float fx,
float fy,
float viewangle,
float winaspect,
float near,
float far)
get the viewing ray (for picking). direction is not normalized. |
void |
zoomOut(float f)
zoom (dolly) camera (away from viewing plane) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected float[] position_
protected Quaternion orientation_
static final int X
static final int Y
static final int Z
Constructor Detail |
---|
public Camera()
Method Detail |
---|
public void reset()
public void levelize()
public void untilt()
public void setCamera(float viewangle, float winaspect, float hither, float yon)
viewangle
- vertical field of viewwinaspect
- window aspect (width/height)hither
- near clipping planeyon
- far clipping planepublic void zoomOut(float f)
public void translateVP(float x, float y, float aspect, float scale)
public void translateVec(float[] tran)
public void rotateXYposition(float l2r, float t2b)
public void rotateXYcenter(float l2r, float t2b, float[] center)
public void approachPosition(float[] poi, float ktran, float hither)
public void approachNormal(float[] poi, float[] normal, float krot)
interpolateViews(iicm.utils3d.Camera, iicm.utils3d.Camera, float)
public void interpolateViews(Camera cam1, Camera cam2, float t)
public void interpolateViews(float[] pos1, Quaternion or1, float[] pos2, Quaternion or2, float t)
public Ray viewingRay(float fx, float fy, float viewangle, float winaspect, float near, float far)
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)public void printValues(java.io.PrintStream os)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |