org.jpbrt.cameras
Class OrthographicCamera
java.lang.Object
org.jpbrt.core.Camera
org.jpbrt.core.ProjectiveCamera
org.jpbrt.cameras.OrthographicCamera
public class OrthographicCamera
- extends ProjectiveCamera
Alternative implementation of OrthoCamera
, this time based on the
first edition of the book.
Orthographic Camera
takes a rectangular region of the scene and
projects it onto the front face of the box that defines the region. It does
not give the effect of foreshorting, but it does preserve parallel lines and
relative distance between objects.
References:
- M. Pharr, G. Humphreys. (2004). Physically Based Rendering.
Morgan Kaufmann.
CHAPTER 06, Section 6.2.1, page 261.
- Version:
- 1.0 2010-09-09 Created.
- Author:
- Werner Randelshofer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
OrthographicCamera
public OrthographicCamera(AnimatedTransform cam2world,
float[] screen,
float hither,
float yon,
float sopen,
float sclose,
float lensr,
float focald,
Film film)
- Parameters:
cam2world
- Transforms world coordinates into camera coordinates.screen
- hither
- The near plane used for clipping.yon
- The far plane used for clipping.sopen
- The time when the shutter opens.sclose
- The time when the shutter closes.lensr
- The lens radius for simulation of depth of field. Specify 0
for infinite depth of field.focald
- The focal Distance for simulation of depth of field.film
- The film onto which the image is stored.
generateRay
public float generateRay(CameraSample sample,
Ray ray)
- page 264.
- Specified by:
generateRay
in class Camera
- Returns:
- A weight for the effect that light arriving at the film plane
along the generated ray will have on the final image. Most cameras always
return a value of one, but cameras that simulate real physical lens
systems might need to set this value based on the optics and the
geometry of the virtual lens system.