JPBRT 0.5

org.jpbrt.cameras
Class OrthographicCamera

java.lang.Object
  extended by org.jpbrt.core.Camera
      extended by org.jpbrt.core.ProjectiveCamera
          extended by 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:

Version:
1.0 2010-09-09 Created.
Author:
Werner Randelshofer

Field Summary
 
Fields inherited from class org.jpbrt.core.ProjectiveCamera
cameraToScreen, focalDistance, lensRadius, rasterToCamera, rasterToScreen, screenToRaster
 
Fields inherited from class org.jpbrt.core.Camera
cameraToWorld, film, shutterClose, shutterOpen
 
Constructor Summary
OrthographicCamera(AnimatedTransform cam2world, float[] screen, float hither, float yon, float sopen, float sclose, float lensr, float focald, Film film)
           
 
Method Summary
 float generateRay(CameraSample sample, Ray ray)
          page 264.
 
Methods inherited from class org.jpbrt.core.ProjectiveCamera
toString
 
Methods inherited from class org.jpbrt.core.Camera
generateRayDifferential, getFilm, setFilm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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.

Copyright 2010 © by the authors and contributors of the JPBRT project.
Some rights reserved.