|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCamera
public class Camera
This class represents a viewpoint and a (limited) view plane.
Field Summary | |
---|---|
static int |
DEFAULT_IMAGE_HEIGHT
|
static int |
DEFAULT_IMAGE_WIDTH
|
Constructor Summary | |
---|---|
Camera()
Creates an empty Camera . |
|
Camera(java.lang.String title)
Creates an empty Camera with the specified title. |
|
Camera(java.lang.String title,
Vector4 pos,
Vector4 dir,
Vector4 up,
float focal,
float fov,
java.awt.image.BufferedImage im)
Creates a new Camera with the specified parameters. |
Method Summary | |
---|---|
Vector4 |
getDir()
Returns the view direction relative to the view point. |
float |
getFocalLength()
Returns the focal length (in meters). |
float |
getFov()
Returns the field-of-view (in degrees). |
java.awt.image.BufferedImage |
getImage()
Returns the image seen by the Camera . |
Vector4 |
getPos()
Returns the position in world coordinates. |
int |
getRGB(int x,
int y)
Returns the color of the specified pixel in the image of this camera. |
java.lang.String |
getTitle()
Returns the title. |
Vector4 |
getUp()
Returns the "up" direction relative to the view point. |
void |
resetImage()
Resets the image seen by this Camera to an empty one. |
java.lang.String |
toString()
Returns the title. |
void |
update(java.lang.String title,
Vector4 pos,
Vector4 dir,
Vector4 up,
float focal,
float fov,
java.awt.image.BufferedImage im)
Updates this Camera with the supplied data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_IMAGE_WIDTH
public static final int DEFAULT_IMAGE_HEIGHT
Constructor Detail |
---|
public Camera()
Camera
.
public Camera(java.lang.String title, Vector4 pos, Vector4 dir, Vector4 up, float focal, float fov, java.awt.image.BufferedImage im)
Camera
with the specified parameters.
title
- the title of the Camera
.pos
- the position of the Camera
in world coordinates.dir
- the direction of the Camera
relative to the
view point.up
- the "up" direction of the Camera
relative to the
view point.focal
- the focal length (in meters, assuming world coordinate
units is meters) of the Camera
.fov
- the field-of-view of the Camera
in degrees.im
- the BufferedImage
representing the limited view
plane of this Camera
.public Camera(java.lang.String title)
Camera
with the specified title.
title
- the title of the Camera
.Method Detail |
---|
public void update(java.lang.String title, Vector4 pos, Vector4 dir, Vector4 up, float focal, float fov, java.awt.image.BufferedImage im)
Camera
with the supplied data.
title
- the title of the Camera
.pos
- the position of the Camera
in world coordinates.dir
- the direction of the Camera
relative to the
view point.up
- the "up" direction of the Camera
relative to the
view point.focal
- the focal length (in meters, assuming world coordinate
units is meters) of the Camera
.fov
- the field-of-view of the Camera
in degrees.im
- the BufferedImage
representing the limited view
plane of this Camera
.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getTitle()
public Vector4 getPos()
public Vector4 getDir()
public Vector4 getUp()
public float getFocalLength()
public float getFov()
public java.awt.image.BufferedImage getImage()
Camera
.
Camera
.public void resetImage()
Camera
to an empty one.
public int getRGB(int x, int y)
x
- the X-coordinate of the pixel.y
- the Y-coordinate of the pixel.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |