|
Bouncy Castle Rendering Toolkit 1.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.bouncycastle.graphics.rt.MovingCamera
Constructor Summary | |
MovingCamera()
|
Method Summary | |
void |
configureLenseMask(int samples,
boolean jitter)
|
Ray |
generateRay(int sampleNo,
int time,
float x,
float y)
|
void |
lookAt(Point3d[] eyes,
Point3d[] refs,
Vector3d[] ups)
set the "look at" details for the camera. |
void |
lookAt(Point3d eye,
Point3d ref,
Vector3d up)
set the "look at" details for the camera. |
void |
ortho(double left,
double right,
double bottom,
double top,
double near,
double far)
Define a three dimensional viewing box by giving the left, right, bottom and top clipping plane locations and the distances along the line of sight to the near and far clipping planes. |
void |
perspective(double fov)
Specifiy a perspective projection for the image, with the near clipping plan at 0 and the far one at infinity. |
void |
perspective(double fov,
double zNear,
double zFar)
Specify a perspective viewing pyramid in world coordinates by giving a field of view and the locations of the near(zNear) and far(zFar) clipping planes in the z direction. |
void |
setDepthOfField(double fStop,
double focalLength,
double focalDistance)
In the normal situation with a real camera the diameter of the lense opening means that the camera is only capable of rendering objects sharply over a limited range of distances. |
void |
setTwist(double twist)
set a twist about the line of sight. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MovingCamera()
Method Detail |
public void lookAt(Point3d eye, Point3d ref, Vector3d up)
eye
- the eye position.ref
- the point we are looking at.up
- the direction of world up.public void lookAt(Point3d[] eyes, Point3d[] refs, Vector3d[] ups)
eyes
- the eye positions.refs
- the corresponding reference positions.ups
- the corresponding up vectors.public void setTwist(double twist)
the
- twist angle, in degrees.public void setDepthOfField(double fStop, double focalLength, double focalDistance)
The default for a camera in our situation, is that it's a pin-hole and has an infinite depth of field. Finite depth of field, however, adds additional cues for depth perception, as well as adding an aesthetic touch to the image.
To add depth of field to an image we have to specify, a focal distance, a focal length, and the f-stop. The f-stop represents the size of the aperture admitting light into the camera, and the depth of field is determined by the ratio of the focal length to the f-stop and the focal distance.
Generaly the length units are millimeters, but in this case the units used are irrelevant, the units for focal length just need to be the same as for the focal distance.
fStop
- the f-stop for the camera.focalLength
- the focal length of the lense.focalDistance
- distance at which objects will appear sharpest.public void perspective(double fov)
fov
- the field of view.public void perspective(double fov, double zNear, double zFar)
fov
- the field of view.zNear
- the near clipping plan.zFar
- the far clipping plan.public void ortho(double left, double right, double bottom, double top, double near, double far)
public void configureLenseMask(int samples, boolean jitter)
public Ray generateRay(int sampleNo, int time, float x, float y)
|
Bouncy Castle Rendering Toolkit 1.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |