In some cases, orientation information is also needed in order to describe the position of an object in the 3D world (e.g., in which direction the camera is looking). The SGPosition class contains both coordinate (x, y, height) and orientation (yaw, pitch, and roll) properties. In addition, the SGPosition can also describe a point of interest and the distance from which to observe the point of interest.
Constructor
Name |
Description |
Initializes a new instance of the SGPosition class |
Properties
Name |
Description |
The x coordinate, usually longitude. |
|
The y coordinate, usually latitude. |
|
The height of the coordinate. |
|
The height type of the coordinate. |
|
The direction in which the camera/object should be looking. |
|
The tilt angle in which the camera/object should be looking. |
|
The roll angle of the object. |
|
Distance from which the x, y and height properties are viewed. |
Methods
Name |
Description |
Moves the coordinate a specific distance. |
|
Moves a coordinate the given distance toward another coordinate. |
|
Moves a coordinate a given percentage toward another coordinate. |
|
Measures the distance between two coordinates. |
|
Measures the angles (yaw and pitch) between two coordinates. |
|
Returns an SGPosition object that represents the same position as the caller’s coordinates and the angles that are directed toward the given coordinates. |
|
Returns an SGPosition object that is converted to absolute height. |
|
Returns an SGPosition object that is converted to height relative to terrain. |
|
Converts the height of the caller to a new height type based on the caller’s x and y. |
|
isEqual Method |
Compare the properties values of this SGPosition object to another SGPosition object. |