Class SimpleCamera
java.lang.Object
|
+--SimpleCamera
- Direct Known Subclasses:
- Camera
- public class SimpleCamera
- extends java.lang.Object
SimpleCamera implements the simple camera where the VPN is along
-Z, VUV is Y and the COP is on Z. A viewport is specified on
the XY plane.
Constructor Summary |
SimpleCamera()
Create a basic camera with resolution of 100 by 100 |
SimpleCamera(int x,
int y)
Create a basic camera with given resolution |
Method Summary |
protected void |
initBasic(int x,
int y)
|
Ray |
ray(int i,
int j)
Get the ray number i, j from the camera model |
void |
setCOP(double cop)
Set the centre of projection on the Z axis |
void |
setResolution(int x,
int y)
Set the resolution of the camera in terms of the number of rays
to cast. |
void |
setVPWindow(double xmin,
double xmax,
double ymin,
double ymax)
Set the viewport window on the XY plane |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SimpleCamera
public SimpleCamera()
- Create a basic camera with resolution of 100 by 100
SimpleCamera
public SimpleCamera(int x,
int y)
- Create a basic camera with given resolution
- Parameters:
x
- the number of rays acrossy
- the number of rays down
initBasic
protected void initBasic(int x,
int y)
setVPWindow
public void setVPWindow(double xmin,
double xmax,
double ymin,
double ymax)
- Set the viewport window on the XY plane
- Parameters:
xmin
- the minimum x valuexmax
- the maximum x valueymin
- the minimum y valueymax
- the maximum y value
setCOP
public void setCOP(double cop)
- Set the centre of projection on the Z axis
- Parameters:
cop
- the COP z value
setResolution
public void setResolution(int x,
int y)
- Set the resolution of the camera in terms of the number of rays
to cast.
- Parameters:
x
- the number of rays acrossy
- the number of rays down
ray
public Ray ray(int i,
int j)
- Get the ray number i, j from the camera model
- Parameters:
i
- the x index of the ray to createj
- the y index of the ray to create- Returns:
- a new ray as specified by the camera