|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCamera
public class Camera
A simple camera class for specifying the view into the scene.
Our 'camera' model is as follows. The center of the view plane is located at c = (cx, cy, cz). The view window (whose center is also c) is defined by two vectors u = (ux, uy, uz) and v = (vx, vy, vz) in the view plane:
The view reference point (eye) is located at c + e, with e = (ex, ey, ez).
Some things to note about our camera model:
Constructor Summary | |
---|---|
Camera()
Constructs a camera with a view window centered at the origin on the XY plane, with a width (x-axis) and height (y-axis) of 1, and the eye point at (0,0,1) looking down the negative z-axis. |
|
Camera(javax.vecmath.Point3d viewCenter,
javax.vecmath.Vector3d widthVector,
javax.vecmath.Vector3d heightVector,
javax.vecmath.Vector3d eyeVector)
Constructs a camera with the specified parameters. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a copy of the object. |
javax.vecmath.Vector3d |
getEyeVector()
Returns the eyeVector. |
javax.vecmath.Vector3d |
getHeightVector()
Returns the heightVector. |
javax.vecmath.Point3d |
getViewCenter()
Returns the viewCenter. |
javax.vecmath.Vector3d |
getWidthVector()
Returns the widthVector. |
void |
load(DataParser dataParser)
Loads data using the DataParser object. |
void |
setEyeVector(javax.vecmath.Vector3d eyeVector)
Sets the eyeVector. |
void |
setHeightVector(javax.vecmath.Vector3d heightVector)
Sets the heightVector. |
void |
setViewCenter(javax.vecmath.Point3d viewCenter)
Sets the viewCenter. |
void |
setWidthVector(javax.vecmath.Vector3d widthVector)
Sets the widthVector. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Camera()
public Camera(javax.vecmath.Point3d viewCenter, javax.vecmath.Vector3d widthVector, javax.vecmath.Vector3d heightVector, javax.vecmath.Vector3d eyeVector)
viewCenter
- The center of the view window.widthVector
- The vector from the viewCenter
to positive
horizontal edge of the view window.heightVector
- The vector from the viewCenter
to positive
vertical edge of the view window.eyeVector
- The vector from the viewCenter
to the eye point.Method Detail |
---|
public java.lang.Object clone()
CloneableEx
clone
in interface CloneableEx
clone
in class java.lang.Object
public void load(DataParser dataParser)
Persistent
DataParser
object.
A class overrides this function to load data that has been parsed.
load
in interface Persistent
dataParser
- The DataParser
to load data from.public void setViewCenter(javax.vecmath.Point3d viewCenter)
viewCenter
- The viewCenter to set.public javax.vecmath.Point3d getViewCenter()
public void setWidthVector(javax.vecmath.Vector3d widthVector)
widthVector
- The widthVector to set.public javax.vecmath.Vector3d getWidthVector()
public void setHeightVector(javax.vecmath.Vector3d heightVector)
heightVector
- The heightVector to set.public javax.vecmath.Vector3d getHeightVector()
public void setEyeVector(javax.vecmath.Vector3d eyeVector)
eyeVector
- The eyeVector to set.public javax.vecmath.Vector3d getEyeVector()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |