pl.webnet.JaTrac
Class Camera
java.lang.Object
|
+--pl.webnet.JaTrac.Camera
- All Implemented Interfaces:
- XmlSettable
- class Camera
- extends java.lang.Object
- implements XmlSettable
Constructor Summary |
Camera()
|
Camera(pl.webnet.JaTrac.Point origin,
pl.webnet.JaTrac.Point[] imgPlane,
double twist)
|
Camera(pl.webnet.JaTrac.Point origin,
pl.webnet.JaTrac.Point target,
pl.webnet.JaTrac.Vec up,
double angle,
double aspect)
|
Method Summary |
protected pl.webnet.JaTrac.Spectrum |
antialiasPixel(double threshold,
pl.webnet.JaTrac.Spectrum[][] pixelCache,
int pX,
int pY,
int pSize,
double x,
double y,
double size)
|
void |
attachScreen(pl.webnet.JaTrac.Screen scr)
|
pl.webnet.JaTrac.Ray |
generateRay(double x,
double y)
Generate a primary (camera) ray. |
java.lang.String[] |
getAttachArray()
Get object's attach array. |
java.lang.String[] |
getParamArray()
Get object's parameter array. |
java.lang.Object |
initialize()
Initialize object's internal state after setting all params from XML file. |
void |
recalcParams()
|
void |
render(pl.webnet.JaTrac.Scene scene)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
origin
protected pl.webnet.JaTrac.Point origin
target
pl.webnet.JaTrac.Point target
direction
pl.webnet.JaTrac.Vec direction
up
pl.webnet.JaTrac.Vec up
right
pl.webnet.JaTrac.Vec right
twist
double twist
angleX
double angleX
angleY
double angleY
aspect
double aspect
recursionDepth
int recursionDepth
screen
pl.webnet.JaTrac.Screen screen
imagePlaneUL
pl.webnet.JaTrac.Point imagePlaneUL
imagePlaneUR
pl.webnet.JaTrac.Point imagePlaneUR
imagePlaneLL
pl.webnet.JaTrac.Point imagePlaneLL
imagePlaneWidth
double imagePlaneWidth
imagePlaneHeight
double imagePlaneHeight
imagePlaneRight
pl.webnet.JaTrac.Vec imagePlaneRight
imagePlaneUp
pl.webnet.JaTrac.Vec imagePlaneUp
rayTree
pl.webnet.JaTrac.RayTree rayTree
name
java.lang.String name
ambientSpectrum
pl.webnet.JaTrac.Spectrum ambientSpectrum
mediumSpectrum
pl.webnet.JaTrac.Spectrum mediumSpectrum
Camera
public Camera()
Camera
public Camera(pl.webnet.JaTrac.Point origin,
pl.webnet.JaTrac.Point target,
pl.webnet.JaTrac.Vec up,
double angle,
double aspect)
Camera
public Camera(pl.webnet.JaTrac.Point origin,
pl.webnet.JaTrac.Point[] imgPlane,
double twist)
initialize
public java.lang.Object initialize()
- Description copied from interface:
XmlSettable
- Initialize object's internal state after setting all params from XML file.
Called after element's end tag is encountered in XML file.
- Specified by:
initialize
in interface XmlSettable
getParamArray
public java.lang.String[] getParamArray()
- Description copied from interface:
XmlSettable
- Get object's parameter array. The array maps XML element names to variable
names and, if setting one variable is not enough, lists names of functions
to call.
- Specified by:
getParamArray
in interface XmlSettable
- Returns:
- object's parameter array.
getAttachArray
public java.lang.String[] getAttachArray()
- Description copied from interface:
XmlSettable
- Get object's attach array. The array specifies what functions to call to
attach children nodes to this object.
- Specified by:
getAttachArray
in interface XmlSettable
- Returns:
- object's attach array.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
recalcParams
public void recalcParams()
attachScreen
public void attachScreen(pl.webnet.JaTrac.Screen scr)
generateRay
public pl.webnet.JaTrac.Ray generateRay(double x,
double y)
- Generate a primary (camera) ray.
- Parameters:
x
- point on x axis that ray has to go through (screen space)y
- point on y axis that ray has to go through (screen space)
- Returns:
- primary ray originating at camera's position and going through
(x, y)
render
public void render(pl.webnet.JaTrac.Scene scene)
antialiasPixel
protected pl.webnet.JaTrac.Spectrum antialiasPixel(double threshold,
pl.webnet.JaTrac.Spectrum[][] pixelCache,
int pX,
int pY,
int pSize,
double x,
double y,
double size)