|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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)
Camera
Changing the mode does not reset the camera.
setProjectionMode
in interface Camera
mode
- intpublic final int getProjectionMode()
Camera
getProjectionMode
in interface Camera
public void reset()
Camera
reset
in interface Camera
public void setXYZ(double x, double y, double z)
Camera
setXYZ
in interface Camera
x
- doubley
- doublez
- doublepublic void setXYZ(double[] point)
Camera
setXYZ
in interface Camera
point
- double[]public final double getX()
Camera
getX
in interface Camera
public final double getY()
Camera
getY
in interface Camera
public final double getZ()
Camera
getZ
in interface Camera
public void setFocusXYZ(double x, double y, double z)
Camera
setFocusXYZ
in interface Camera
x
- doubley
- doublez
- doublepublic void setFocusXYZ(double[] point)
Camera
setFocusXYZ
in interface Camera
point
- double[]public final double getFocusX()
Camera
getFocusX
in interface Camera
public final double getFocusY()
Camera
getFocusY
in interface Camera
public final double getFocusZ()
Camera
getFocusZ
in interface Camera
public void setRotation(double angle)
Camera
setRotation
in interface Camera
angle
- double The angle in radianspublic final double getRotation()
Camera
getRotation
in interface Camera
public void setDistanceToScreen(double distance)
Camera
setDistanceToScreen
in interface Camera
distance
- doublepublic final double getDistanceToScreen()
Camera
getDistanceToScreen
in interface Camera
public void setAzimuth(double angle)
Camera
setAzimuth
in interface Camera
angle
- the desired angle in radianspublic final double getAzimuth()
Camera
getAzimuth
in interface Camera
public void setAltitude(double angle)
Camera
setAltitude
in interface Camera
angle
- 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 Camera
azimuth
- 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 Camera
public void copyFrom(Camera camera)
Camera
copyFrom
in interface Camera
public static XML.ObjectLoader getLoader()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |