com.supermap.realspace
Class LookAt
- java.lang.Object
-
- com.supermap.realspace.LookAt
-
public class LookAt extends java.lang.Object
The camera class LookAtThis class is for determining the position of scene according to the position of the observation, the direction angle, the angle of pitch and the distance from the camera to the observation.
-
-
Constructor Summary
Constructors Constructor and Description LookAt(double longitude, double latitude, double range)
Constructs a new LookAt object based on the longitude and latitude of the specified viewpoint and the distance from the specified camera.LookAt(double longitude, double latitude, double range, AltitudeMode mode)
Constructs a new LookAt object based on the longitude and latitude of the specified viewpoint and the distance from the specified camera.LookAt(double longitude, double latitude, double altitude, AltitudeMode mode, double tilt, double heading, double range)
Constructs a new LookAt object based on the longitude, latitude, angle of pitch, azimuth angle, distance and altitude mode of the specified viewpoint.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description boolean
equals(LookAt lookAt)
Determines whether the two camera are the samedouble
getAltitude()
Gets the altitude of the viewpointAltitudeMode
getAltitudeMode()
Gets the altitude mode of the viewpointdouble
getHeading()
Gets the azimuth of the viewpoint that is the angle between the north and the point in the clockwise direction which ranges from 0 to 360 degreedouble
getLatitude()
Gets the latitude of the viewpoint.double
getLongitude()
Gets the longitude of the viewpoint relative to the prime meridian in degree.double
getRange()
Gets the distance between the camera and the viewpoint.double
getTilt()
Gets the angle between LookAt position and the surface normal which ranges from 0 to 90 degree.boolean
isValid()
Determines whether it is visiblevoid
setAltitude(double atitude)
Sets the altitude of the viewpointvoid
setAltitudeMode(AltitudeMode mode)
Sets the altitude mode of the viewpoint.void
setHeading(double heading)
Sets the azimuth of the viewpoint that is the angle between the north and the point in the clockwise direction which ranges from 0 to 360 degreevoid
setLatitude(double latitude)
Sets the latitude of the viewpoint.void
setLongtitude(double longtitude)
Sets the latitude of the viewpoint relative to the prime meridian in degree.void
setRange(double range)
Sets the distance between the camera and the viewpoint.void
setTilt(double tilt)
Sets the angle between LookAt position and the surface normal which ranges from 0 to 90 degree.java.lang.String
toString()
Returns a string for describing the LookAt object
-
-
-
Constructor Detail
-
LookAt
public LookAt(double longitude, double latitude, double range)
Constructs a new LookAt object based on the longitude and latitude of the specified viewpoint and the distance from the specified camera.- Parameters:
longitude
- The specified longitude.latitude
- The specified latituderange
- The specified distance
-
LookAt
public LookAt(double longitude, double latitude, double range, AltitudeMode mode)
Constructs a new LookAt object based on the longitude and latitude of the specified viewpoint and the distance from the specified camera.- Parameters:
longitude
- The specified longitude.latitude
- The specified latituderange
- The specified distancemode
- The specified altitude mode
-
LookAt
public LookAt(double longitude, double latitude, double altitude, AltitudeMode mode, double tilt, double heading, double range)
Constructs a new LookAt object based on the longitude, latitude, angle of pitch, azimuth angle, distance and altitude mode of the specified viewpoint.- Parameters:
longitude
- The specified longitude.latitude
- The specified latitudealtitude
- The specified altitudemode
- The specified altitude modetilt
- The specified angle of pitchheading
- The specified azimuthrange
- The specified distance
-
-
Method Detail
-
getLatitude
public double getLatitude()
Gets the latitude of the viewpoint. Identifies the degree north or south of the equator and the value ranges from -90 degree to 90 degree.- Returns:
- Gets the latitude of the viewpoint.
-
setLatitude
public void setLatitude(double latitude)
Sets the latitude of the viewpoint. Identifies the degree north or south of the equator and the value ranges from -90 degree to 90 degree.- Parameters:
latitude
- The specified latitude
-
getLongitude
public double getLongitude()
Gets the longitude of the viewpoint relative to the prime meridian in degree. The value west of the prime meridian ranges from -180 to 0 degree, and the value east of the prime meridian ranges from 0 degree to 180 degree.- Returns:
- Gets the longitude of the viewpoint relative to the prime meridian in degree.
-
setLongtitude
public void setLongtitude(double longtitude)
Sets the latitude of the viewpoint relative to the prime meridian in degree. The value west of the prime meridian ranges from -180 to 0 degree, and the value east of the prime meridian ranges from 0 degree to 180 degree.- Parameters:
longtitude
- The specified longitude
-
getAltitude
public double getAltitude()
Gets the altitude of the viewpoint- Returns:
- Gets the altitude of the viewpoint
-
setAltitude
public void setAltitude(double atitude)
Sets the altitude of the viewpoint- Parameters:
atitude
- the specified altitude
-
getTilt
public double getTilt()
Gets the angle between LookAt position and the surface normal which ranges from 0 to 90 degree. O degree means checking the viewpoint vertically, while 90 degree means viewing the observation point horizontally.- Returns:
- Gets the angle between LookAt position and the surface normal which ranges from 0 to 90 degree.
-
setTilt
public void setTilt(double tilt)
Sets the angle between LookAt position and the surface normal which ranges from 0 to 90 degree. O degree means checking the viewpoint vertically, while 90 degree means viewing the observation point horizontally.- Parameters:
tilt
- The specified angle
-
getHeading
public double getHeading()
Gets the azimuth of the viewpoint that is the angle between the north and the point in the clockwise direction which ranges from 0 to 360 degree- Returns:
- Gets the azimuth of the viewpoint that is the angle between the north and the point in the clockwise direction which ranges from 0 to 360 degree
-
setHeading
public void setHeading(double heading)
Sets the azimuth of the viewpoint that is the angle between the north and the point in the clockwise direction which ranges from 0 to 360 degree- Parameters:
heading
- The specified azimuth
-
getRange
public double getRange()
Gets the distance between the camera and the viewpoint. Unit: meter.- Returns:
- Gets the distance between the camera and the viewpoint. Unit: meter.
-
setRange
public void setRange(double range)
Sets the distance between the camera and the viewpoint. Unit: meter.- Parameters:
range
- The specified distance
-
getAltitudeMode
public AltitudeMode getAltitudeMode()
Gets the altitude mode of the viewpoint- Returns:
- Gets the altitude mode of the viewpoint
-
setAltitudeMode
public void setAltitudeMode(AltitudeMode mode)
Sets the altitude mode of the viewpoint.- Parameters:
mode
- The specified altitude mode
-
isValid
public boolean isValid()
Determines whether it is visible- Returns:
- Determines whether it is visible
-
equals
public boolean equals(LookAt lookAt)
Determines whether the two camera are the same- Parameters:
lookAt
- The specified target camera LookAt.- Returns:
- Determines whether the two camera are the same
-
toString
public java.lang.String toString()
Returns a string for describing the LookAt object- Overrides:
toString
in classjava.lang.Object
-
-