|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sygem.jazz3d3.Camera3d
A viewpoint into the world. The use of a Camera3d class can make your interactive Jazz3D programs considerably more efficient. For example, if you wanted to move around the World without a Camera3d object, you would need to move every single object in the World to achieve the illusion of movement. With the use of a Camera3d object, this is not required. Note that every World always has a default Camera3d added to it, at position (0,0,0).
Constructor Summary | |
Camera3d()
Default constructor. |
Method Summary | |
Vertex |
getPosition()
Get the position of the camera. |
double |
getXPosition()
Get the x position of the camera. |
double |
getYPosition()
Get the y position of the camera. |
double |
getZPosition()
Get the z position of the camera. |
void |
init(float xx,
float xy,
float xz,
float xo,
float yx,
float yy,
float yz,
float yo,
float zx,
float zy,
float zz,
float zo,
float ox,
float oy,
float oz,
float oo)
|
void |
pointAt(double x,
double y,
double z)
Point the camera somewhere. |
void |
pointAt(Object3d obj)
Point the camera at an object. |
void |
pointAt(Vertex v)
Point the camera somewhere. |
void |
rotateLocal(double x,
double y,
double z)
Rotates the camera a given amount around the camera's own axis. |
void |
rotateLocal(double x,
double y,
double z,
double px,
double py,
double pz)
Rotates the camera a given amount around a specified point, around the camera's own axis. |
void |
rotatePointAt(double x,
double y,
double z)
Rotate the pointAt vector to point the camera somewhere. |
void |
rotateWorld(double x,
double y,
double z)
Rotates the camera a given amount around the static world axis. |
void |
rotateWorld(double x,
double y,
double z,
double px,
double py,
double pz)
Rotates the camera a given amount around a specified point, around the static world axis. |
void |
setPosition(double x,
double y,
double z)
Sets the position of the camera. |
void |
setPosition(Vertex v)
Sets the position of the camera. |
void |
setViewingAngle(double a)
Sets the viewing angle of the camera. |
java.lang.String |
toString()
|
void |
translateLocal(double x,
double y,
double z)
Move the camera relative to its own axis. |
void |
translateWorld(double x,
double y,
double z)
Move the camera relative to the world axis. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Camera3d()
Method Detail |
public final Vertex getPosition()
public final double getXPosition()
public final double getYPosition()
public final double getZPosition()
public void init(float xx, float xy, float xz, float xo, float yx, float yy, float yz, float yo, float zx, float zy, float zz, float zo, float ox, float oy, float oz, float oo)
public final void pointAt(double x, double y, double z)
x
- The x co-ordinate of the point to look at.y
- The y co-ordinate of the point to look at.z
- The z co-ordinate of the point to look at.public final void pointAt(Object3d obj)
obj
- A reference to an object.Object3d.getCenter()
public final void pointAt(Vertex v)
v
- A vertex to point the camera at.public final void rotateLocal(double x, double y, double z)
x
- The number of degrees to rotate the camera around the x-axis.y
- The number of degrees to rotate the camera around the y-axis.z
- The number of degrees to rotate the camera around the z-axis.rotateLocal(double, double, double, double, double, double)
,
rotatePointAt(double, double, double)
public final void rotateLocal(double x, double y, double z, double px, double py, double pz)
x
- The number of degrees to rotate the camera around the x-axis.y
- The number of degrees to rotate the camera around the y-axis.z
- The number of degrees to rotate the camera around the z-axis.px
- The x position of the point to rotate around.py
- The y position of the point to rotate around.pz
- The z position of the point to rotate around.rotateLocal(double, double, double)
public final void rotatePointAt(double x, double y, double z)
x
- The number of degrees to rotate the camera around the x-axis.y
- The number of degrees to rotate the camera around the y-axis.z
- The number of degrees to rotate the camera around the z-axis.public final void rotateWorld(double x, double y, double z)
x
- The number of degrees to rotate the camera around the x-axis.y
- The number of degrees to rotate the camera around the y-axis.z
- The number of degrees to rotate the camera around the z-axis.rotateWorld(double, double, double, double, double, double)
public final void rotateWorld(double x, double y, double z, double px, double py, double pz)
x
- The number of degrees to rotate the camera around the x-axis.y
- The number of degrees to rotate the camera around the y-axis.z
- The number of degrees to rotate the camera around the z-axis.px
- The x position of the point to rotate around.py
- The y position of the point to rotate around.pz
- The z position of the point to rotate around.rotateWorld(double, double, double)
public final void setPosition(double x, double y, double z)
x
- The x component of the new location of the camera.y
- The y component of the new location of the camera.z
- The z component of the new location of the camera.setPosition(Vertex)
public final void setPosition(Vertex v)
v
- A vertex representing the new location of the camera.setPosition(double, double, double)
public final void setViewingAngle(double a)
a
- The angle, in degreespublic java.lang.String toString()
public final void translateLocal(double x, double y, double z)
x
- The distance to move the camera along the x axis.y
- The distance to move the camera along the y axis.z
- The distance to move the camera along the z axis.public final void translateWorld(double x, double y, double z)
x
- The distance to move the camera along the x axis.y
- The distance to move the camera along the y axis.z
- The distance to move the camera along the z axis.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |