de.grogra.imp3d
Class PerspectiveProjection

java.lang.Object
  extended by de.grogra.persistence.ShareableBase
      extended by de.grogra.imp3d.Projection
          extended by de.grogra.imp3d.PerspectiveProjection
All Implemented Interfaces:
Manageable, Shareable
Direct Known Subclasses:
LensProjection

public class PerspectiveProjection
extends Projection


Nested Class Summary
static class PerspectiveProjection.Type
           
 
Field Summary
static PerspectiveProjection.Type $TYPE
           
protected  float fieldOfView
           
static SCOType.Field fieldOfView$FIELD
           
 
Fields inherited from class de.grogra.imp3d.Projection
aspect, aspect$FIELD, sx, sy
 
Constructor Summary
PerspectiveProjection()
           
PerspectiveProjection(float fieldOfView, float aspect)
           
 
Method Summary
static float clampFieldOfView(float fieldOfView)
           
 float getFieldOfView()
           
 ManageableType getManageableType()
           
protected  void getRayInViewCoordinates(float x, float y, Point3d origin, Vector3d direction, Matrix4d deviceToView, Tuple2d densities)
           
 float getScaleAt(float z)
           
protected  void getTransformation(float near, float far, Matrix4d viewToClip, Matrix4d deviceToView)
           
 void setFieldOfView(float fieldOfView)
           
protected  void update()
           
 
Methods inherited from class de.grogra.imp3d.Projection
completeRay, computeBSDF, generateRandomOrigins, generateRandomRays, getAspect, getScaleX, getScaleY
 
Methods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

$TYPE

public static final PerspectiveProjection.Type $TYPE

fieldOfView

protected float fieldOfView

fieldOfView$FIELD

public static final SCOType.Field fieldOfView$FIELD
Constructor Detail

PerspectiveProjection

public PerspectiveProjection()

PerspectiveProjection

public PerspectiveProjection(float fieldOfView,
                             float aspect)
Method Detail

clampFieldOfView

public static float clampFieldOfView(float fieldOfView)

getFieldOfView

public float getFieldOfView()

getManageableType

public ManageableType getManageableType()

getRayInViewCoordinates

protected void getRayInViewCoordinates(float x,
                                       float y,
                                       Point3d origin,
                                       Vector3d direction,
                                       Matrix4d deviceToView,
                                       Tuple2d densities)
Specified by:
getRayInViewCoordinates in class Projection

getScaleAt

public float getScaleAt(float z)
Specified by:
getScaleAt in class Projection

getTransformation

protected void getTransformation(float near,
                                 float far,
                                 Matrix4d viewToClip,
                                 Matrix4d deviceToView)
Specified by:
getTransformation in class Projection

setFieldOfView

public void setFieldOfView(float fieldOfView)

update

protected void update()
Specified by:
update in class Projection