|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sunflow.core.Camera
public class Camera
This class represents a camera to the renderer. It handles the mapping of
camera space to world space, as well as the mounting of CameraLens
objects which compute the actual projection.
Constructor Summary | |
---|---|
Camera(CameraLens lens)
|
Method Summary | |
---|---|
Ray |
getRay(float x,
float y,
int imageWidth,
int imageHeight,
double lensX,
double lensY,
float time)
Generate a ray passing though the specified point on the image plane. |
float |
getTime(float time)
Computes actual time from a time sample in the interval [0,1). |
boolean |
update(ParameterList pl,
SunflowAPI api)
Update this object given a list of parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Camera(CameraLens lens)
Method Detail |
---|
public boolean update(ParameterList pl, SunflowAPI api)
RenderObject
update
in interface RenderObject
pl
- list of parameters to read fromapi
- reference to the current scene
true
if the update is succesfull,
false
otherwisepublic float getTime(float time)
time
-
public Ray getRay(float x, float y, int imageWidth, int imageHeight, double lensX, double lensY, float time)
null
for invalid arguments or for pixels which
don't project to anything.
x
- x pixel coordinatey
- y pixel coordinateimageWidth
- width of the image in pixelsimageHeight
- height of the image in pixelslensX
- a random variable in [0,1) to be used for DOF samplinglensY
- a random variable in [0,1) to be used for DOF samplingtime
- a random variable in [0,1) to be used for motion blur
sampling
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |