|
Rings Version 0.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectthreeD.raytracer.camera.OrthographicCamera
The OrthographicCamera class provides an orthographic porjection camera. The camera location is, as expected, the location from which the camera views, represented as a vector. This value is by default at the origin. The viewing direction is a vector that represents the direction the camera is viewing. This value is by default aligned to the positive Z axis, or (0.0, 0.0, 1.0). The up direction is a vector that represents the orientation of the camera's "up." This value is by default aligned with the positive y axis or (0.0, 1.0, 0.0). The projection dimensions of the camera are the dimensions of the viewing plane.
| Field Summary | |
protected Vector |
u
|
protected Vector |
v
|
protected Vector |
w
|
| Constructor Summary | |
OrthographicCamera()
Constructs a new OrthographicCamera object with the defaults described above. |
|
OrthographicCamera(Vector location,
Vector viewDirection,
Vector upDirection)
Constructs an OrthographicCamera object with the specified location, viewing direction, and up direction, but with default projection dimensions as specified above. |
|
OrthographicCamera(Vector location,
Vector viewDirection,
Vector upDirection,
double projectionX,
double proojectionY)
|
|
| Method Summary | |
Vector |
getLocation()
Returns the location of this PinholeCamera object as a Vector object. |
double |
getProjectionHeight()
Returns the projection height of this PinholeCamera object as a double value. |
double |
getProjectionWidth()
Returns the projection width of this PinholeCamera object as a double value. |
TransformMatrix |
getRotationMatrix()
|
Vector |
getUpDirection()
Returns the up direction of this PinholeCamera object as a Vector object. |
Vector |
getViewDirection()
Calls the getViewingDirection() method and returns the result. |
Vector |
getViewingDirection()
Returns the viewing direction of this PinholeCamera object as a Vector object. |
Ray |
rayAt(double i,
double j,
int screenWidth,
int screenHeight)
|
void |
setLocation(Vector location)
Sets the location of this PinholeCamera object to the specified location. |
void |
setProjectionDimensions(double projectionX,
double projectionY)
Sets the projection dimensions to the specified projection dimensions. |
void |
setProjectionHeight(double projectionY)
Sets the projection height of this OrthographicCamera object to the specified projection height. |
void |
setProjectionWidth(double projectionX)
Sets the projection width of this OrthographicCamera object to the specified projection width. |
void |
setUpDirection(Vector upDirection)
Sets the up direction of this PinholeCamera object to the specified up direction. |
void |
setViewDirection(Vector viewDirection)
Calls the setViewingDirection() method. |
void |
setViewingDirection(Vector viewDirection)
Sets the viewing direction of this PinholeCamera object to the specified viewing direction. |
void |
updateUVW()
Updates the orthonormal vectors used to describe camera space for this OrthographicCamera object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Vector u
protected Vector v
protected Vector w
| Constructor Detail |
public OrthographicCamera()
public OrthographicCamera(Vector location,
Vector viewDirection,
Vector upDirection)
location - Camera location.viewDirection - Camera viewing direction.upDirection - Camera up direction.
public OrthographicCamera(Vector location,
Vector viewDirection,
Vector upDirection,
double projectionX,
double proojectionY)
| Method Detail |
public void setLocation(Vector location)
public void setViewDirection(Vector viewDirection)
public void setViewingDirection(Vector viewDirection)
public void setUpDirection(Vector upDirection)
public void setProjectionDimensions(double projectionX,
double projectionY)
public void setProjectionWidth(double projectionX)
public void setProjectionHeight(double projectionY)
public void updateUVW()
public Vector getLocation()
public Vector getViewDirection()
public Vector getViewingDirection()
public Vector getUpDirection()
public double getProjectionWidth()
public double getProjectionHeight()
public TransformMatrix getRotationMatrix()
public Ray rayAt(double i,
double j,
int screenWidth,
int screenHeight)
rayAt in interface Camerai - X coordinate of pixel.j - Y coordinate of pixel.screenWidth - Width of image.screenHeight - Height of image.
Camera.rayAt(double, double, int, int)
|
Rings Version 0.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||