|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectCanvas
org.fixbin.ddd.Camera
This class represents a Camera, which views objects through a "window"
The default camera is positioned at x=0, y=0, z=-10 with its view
direction towards the origin (basically all view axis are identical/parallel
to the "universe" axes.
You can also use the special constructor to initialize the camera position
and view direction.
| Field Summary | |
protected long |
centerX
|
protected long |
centerY
|
Point |
pos
|
long |
scrDist
|
Matrix33 |
view
|
| Constructor Summary | |
Camera()
Creates a new (default) instance of Camera |
|
Camera(long posX,
long posY,
long posZ,
long dir00,
long dir01,
long dir02,
long dir10,
long dir11,
long dir12,
long dir20,
long dir21,
long dir22,
long centerX,
long centerY,
long scrDist)
Creates a new instance of Camera with predefined position and direction |
|
| Method Summary | |
void |
addObject(Object3D object)
Add an object to the camera |
void |
addPoint(Point p)
Add a single point |
void |
calculate()
Renders all objects (should be called before displaying) !!! |
protected void |
paint(Graphics g)
Draw the content of the camera |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public Point pos
public Matrix33 view
protected long centerX
protected long centerY
public long scrDist
| Constructor Detail |
public Camera()
public Camera(long posX,
long posY,
long posZ,
long dir00,
long dir01,
long dir02,
long dir10,
long dir11,
long dir12,
long dir20,
long dir21,
long dir22,
long centerX,
long centerY,
long scrDist)
posX - posY - posZ - dir00 - dir01 - dir02 - dir10 - dir11 - dir12 - dir20 - dir21 - dir22 - centerX - centerY - scrDist - | Method Detail |
public void addObject(Object3D object)
object - (Object3D) the new objectpublic void addPoint(Point p)
p - (Point)public void calculate()
protected void paint(Graphics g)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||