SGCoord3D Class

This class represents a three dimensional coordinate (x,y,height) in the SGWorld.

Constructor

Name

Description

Constructor

Initializes a new instance of the SGCoord3D class.

Properties

Name

Description

x Property

The x coordinate, usually longitude.

y Property

The y coordinate, usually latitude.

height Property

The height of the coordinate.

heightType Property

The height type of the coordinate.

Methods

Name

Description

move Method

Moves a 3D coordinate a specific distance.

moveToward Method

Moves a 3D coordinate a given distance towards another coordinate.

lerp Method

Moves a 3D coordinate a given percentage towards another coordinate.

distanceTo Method

Measures the distance between two coordinates.

anglesTo Method

Measures the angles (yaw and pitch) between two coordinates.

aimTo Method

Returns an SGPosition object that represents the same position as the caller’s 3D coordinate and the angles that are directed toward the given coordinates.

toAbsolute Method

Returns an SGCoord3D object that is converted to absolute height.

toRelative Method

Returns an SGCoord3D object that is converted to height relative to terrain.

changeHeightType Method

Converts the height of the caller to a new height type based on the caller x and y.

isEqual Method

Compare the properties values of this SGCoord3D object to another SGCoord3D object.