|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.display3d.simple3d.Camera
public class Camera
| Nested Class Summary | |
|---|---|
protected static class |
Camera.CameraLoader
|
| Nested classes/interfaces inherited from interface org.opensourcephysics.display3d.core.Camera |
|---|
Camera.Loader |
| Field Summary |
|---|
| Fields inherited from interface org.opensourcephysics.display3d.core.Camera |
|---|
MODE_NO_PERSPECTIVE, MODE_PERSPECTIVE, MODE_PLANAR_XY, MODE_PLANAR_XZ, MODE_PLANAR_YZ |
| Method Summary | |
|---|---|
void |
copyFrom(Camera camera)
Copies its configuration from another camera |
double |
getAltitude()
Get the elevation (vertical) angle of the camera position in spherical coordinates with respect to the focus point. |
double |
getAzimuth()
Get the horizontal angle of the camera position in spherical coordinates with respect to the focus point. |
double |
getDistanceToScreen()
Returns the distance from the camera to the projecting screen. |
double |
getFocusX()
Returns the focus X coordinate |
double |
getFocusY()
Returns the focus Y coordinate |
double |
getFocusZ()
Returns the focus Z coordinate |
static XML.ObjectLoader |
getLoader()
|
int |
getProjectionMode()
Gets the projecting mode of the camera. |
double |
getRotation()
Returns the angle that the camera is rotated along the line of sight. |
Transformation |
getTransformation()
Returns the transfomation used to project (x,y,z) points in space to points of the form (a,b,distance). |
double |
getX()
Returns the camera X coordinate |
double |
getY()
Returns the camera Y coordinate |
double |
getZ()
Returns the camera Z coordinate |
void |
reset()
Resets the camera to the default. |
void |
setAltitude(double angle)
Set the elevation (vertical) angle of the camera position in spherical coordinates with respect to the focus point. |
void |
setAzimuth(double angle)
Set the azimuthal (horizontal) angle of the camera position in spherical coordinates with respect to the focus point. |
void |
setAzimuthAndAltitude(double azimuth,
double altitude)
Set the angles of the camera position in spherical coordinates with respect to the focus point. |
void |
setDistanceToScreen(double distance)
Sets the distance from the camera to the projecting screen. |
void |
setFocusXYZ(double[] point)
Sets the focus of the camera. |
void |
setFocusXYZ(double x,
double y,
double z)
Sets the focus point of the camera. |
void |
setProjectionMode(int mode)
Sets one of the projecting modes. |
void |
setRotation(double angle)
Sets the angle that the camera is rotated along the line of sight. |
void |
setXYZ(double[] point)
Sets the position of the camera. |
void |
setXYZ(double x,
double y,
double z)
Sets the position of the camera. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void setProjectionMode(int mode)
CameraChanging the mode does not reset the camera.
setProjectionMode in interface Cameramode - intpublic final int getProjectionMode()
Camera
getProjectionMode in interface Camerapublic void reset()
Camera
reset in interface Camera
public void setXYZ(double x,
double y,
double z)
Camera
setXYZ in interface Camerax - doubley - doublez - doublepublic void setXYZ(double[] point)
Camera
setXYZ in interface Camerapoint - double[]public final double getX()
Camera
getX in interface Camerapublic final double getY()
Camera
getY in interface Camerapublic final double getZ()
Camera
getZ in interface Camera
public void setFocusXYZ(double x,
double y,
double z)
Camera
setFocusXYZ in interface Camerax - doubley - doublez - doublepublic void setFocusXYZ(double[] point)
Camera
setFocusXYZ in interface Camerapoint - double[]public final double getFocusX()
Camera
getFocusX in interface Camerapublic final double getFocusY()
Camera
getFocusY in interface Camerapublic final double getFocusZ()
Camera
getFocusZ in interface Camerapublic void setRotation(double angle)
Camera
setRotation in interface Cameraangle - double The angle in radianspublic final double getRotation()
Camera
getRotation in interface Camerapublic void setDistanceToScreen(double distance)
Camera
setDistanceToScreen in interface Cameradistance - doublepublic final double getDistanceToScreen()
Camera
getDistanceToScreen in interface Camerapublic void setAzimuth(double angle)
Camera
setAzimuth in interface Cameraangle - the desired angle in radianspublic final double getAzimuth()
Camera
getAzimuth in interface Camerapublic void setAltitude(double angle)
Camera
setAltitude in interface Cameraangle - the desired angle in radians in the range [-Math.PI/2,Math.PI/2]public final double getAltitude()
Camera
getAltitude in interface Camera
public void setAzimuthAndAltitude(double azimuth,
double altitude)
Camera
setAzimuthAndAltitude in interface Cameraazimuth - the desired azimuthal angle in radiansaltitude - the desired altitude angle in radians in the range [-Math.PI/2,Math.PI/2]public final Transformation getTransformation()
Camera
getTransformation in interface Camerapublic void copyFrom(Camera camera)
Camera
copyFrom in interface Camerapublic static XML.ObjectLoader getLoader()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||