Rhino C++ API  8.13
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ON_EarthAnchorPoint Class Reference

#include <opennurbs_3dm_settings.h>

Public Member Functions

 ON_EarthAnchorPoint ()=default
 
 ON_EarthAnchorPoint (const ON_EarthAnchorPoint &)=default
 
 ~ON_EarthAnchorPoint ()=default
 
ON::EarthCoordinateSystem EarthCoordinateSystem () const
 
ON_3dPoint EarthLocation () const
 
ON_3dPoint EarthLocation (ON_3dPoint unset_location) const
 
bool EarthLocationIsSet () const
 
double Elevation (const class ON_UnitSystem &elevation_unit_system) const
 
double Elevation (const class ON_UnitSystem &elevation_unit_system, double unset_elevation) const
 
double Elevation (ON::LengthUnitSystem elevation_unit_system) const
 
double Elevation (ON::LengthUnitSystem elevation_unit_system, double unset_elevation) const
 
double ElevationInMeters () const
 
bool GetKMLOrientationAnglesDegrees (double &heading_degrees, double &tilt_degrees, double &roll_degrees) const
 
bool GetKMLOrientationAnglesRadians (double &heading_radians, double &tilt_radians, double &roll_radians) const
 
bool GetModelCompass (ON_Plane &model_compass) const
 
bool GetModelToEarthXform (const ON_UnitSystem &model_unit_system, ON_Xform &model_to_earth) const
 
const double KMLOrientationHeadingAngleDegrees () const
 
const double KMLOrientationHeadingAngleRadians () const
 
const double KMLOrientationRollAngleDegrees () const
 
const double KMLOrientationRollAngleRadians () const
 
const double KMLOrientationTiltAngleDegrees () const
 
const double KMLOrientationTiltAngleRadians () const
 
double Latitude () const
 
double Latitude (double unset_latitude) const
 
double Longitude () const
 
double Longitude (double unset_longitude) const
 
const ON_3dVectorModelEast () const
 
bool ModelLocationIsSet () const
 
const ON_3dVectorModelNorth () const
 
const ON_3dPointModelPoint () const
 
ON_EarthAnchorPointoperator= (const ON_EarthAnchorPoint &)=default
 
bool Read (ON_BinaryArchive &)
 
void SetEarthCoordinateSystem (ON::EarthCoordinateSystem earth_coordinate_system)
 
void SetEarthLocation (ON::EarthCoordinateSystem earth_coordinate_system, const class ON_UnitSystem &elevation_unit_system, double latitude_degrees, double longitude_degrees, double elevation)
 
void SetEarthLocation (ON::EarthCoordinateSystem earth_coordinate_system, ON::LengthUnitSystem elevation_unit_system, double latitude_degrees, double longitude_degrees, double elevation)
 
void SetElevation (const ON_UnitSystem &elevation_unit_system, double elevation)
 
void SetElevation (ON::LengthUnitSystem elevation_unit_system, double elevation)
 
void SetLatitude (double latitude_degrees)
 
void SetLatitudeAndLongitude (double latitude_degrees, double longitude_degrees)
 
void SetLongitude (double longitude_degrees)
 
void SetModelEast (ON_3dVector model_east)
 
void SetModelLocation (ON_3dPoint model_point, ON_3dVector model_north, ON_3dVector model_east)
 
void SetModelNorth (ON_3dVector model_north)
 
void SetModelPoint (ON_3dPoint model_point)
 
bool Write (ON_BinaryArchive &) const
 

Static Public Member Functions

static int Compare (const ON_EarthAnchorPoint *, const ON_EarthAnchorPoint *)
 
static int CompareEarthLocation (const ON_EarthAnchorPoint *, const ON_EarthAnchorPoint *)
 
static int CompareIdentification (const ON_EarthAnchorPoint *, const ON_EarthAnchorPoint *)
 
static int CompareModelDirection (const ON_EarthAnchorPoint *, const ON_EarthAnchorPoint *)
 

Public Attributes

ON_wString m_description
 
ON_UUID m_id = ON_nil_uuid
 Identification information about this location. More...
 
ON_wString m_name
 
ON_wString m_url
 
ON_wString m_url_tag
 UI link text for m_url. More...
 

Static Public Attributes

static const ON_EarthAnchorPoint SeattleSpaceNeedle
 Latitude, longitude, and elevation are the Seattle Space Needle. More...
 
static const ON_EarthAnchorPoint Unset
 Latitude, longitude, and elevation are ON_UNSET_VALUE. More...
 

Detailed Description

ON_EarthAnchorPoint

Constructor & Destructor Documentation

◆ ON_EarthAnchorPoint() [1/2]

ON_EarthAnchorPoint::ON_EarthAnchorPoint ( )
default

◆ ~ON_EarthAnchorPoint()

ON_EarthAnchorPoint::~ON_EarthAnchorPoint ( )
default

◆ ON_EarthAnchorPoint() [2/2]

ON_EarthAnchorPoint::ON_EarthAnchorPoint ( const ON_EarthAnchorPoint )
default

Member Function Documentation

◆ Compare()

static int ON_EarthAnchorPoint::Compare ( const ON_EarthAnchorPoint ,
const ON_EarthAnchorPoint  
)
static

◆ CompareEarthLocation()

static int ON_EarthAnchorPoint::CompareEarthLocation ( const ON_EarthAnchorPoint ,
const ON_EarthAnchorPoint  
)
static

◆ CompareIdentification()

static int ON_EarthAnchorPoint::CompareIdentification ( const ON_EarthAnchorPoint ,
const ON_EarthAnchorPoint  
)
static

◆ CompareModelDirection()

static int ON_EarthAnchorPoint::CompareModelDirection ( const ON_EarthAnchorPoint ,
const ON_EarthAnchorPoint  
)
static

◆ EarthCoordinateSystem()

ON::EarthCoordinateSystem ON_EarthAnchorPoint::EarthCoordinateSystem ( ) const

System used to define latitude, longitude and elevation.

◆ EarthLocation() [1/2]

ON_3dPoint ON_EarthAnchorPoint::EarthLocation ( ) const

Returns: A 3d point with coordinates (latitude in degrees, longitude in degrees, elevation in meters). Remarks: Some coordinates may be ON_UNSET_VALUE.

◆ EarthLocation() [2/2]

ON_3dPoint ON_EarthAnchorPoint::EarthLocation ( ON_3dPoint  unset_location) const

Parameters: unset_location - [in] Location to return if EarthlocationIsSet() is false. Returns: A 3d point with coordinates (latitude, longitude, elevation).

◆ EarthLocationIsSet()

bool ON_EarthAnchorPoint::EarthLocationIsSet ( ) const

Returns: True if the latitude, longitude, and elevation are set.

◆ Elevation() [1/4]

double ON_EarthAnchorPoint::Elevation ( const class ON_UnitSystem elevation_unit_system) const

Parameters: elevation_unit_system - [in] length unit system for returned value. Returns: Earth location elevation in in elevation_unit_system. The value is with Can be ON_UNSET_VALUE

◆ Elevation() [2/4]

double ON_EarthAnchorPoint::Elevation ( const class ON_UnitSystem elevation_unit_system,
double  unset_elevation 
) const

Parameters: elevation_unit_system - [in] length unit system for returned value. unset_elevation - [in] Value to return if the Earth location elevation is not set.

◆ Elevation() [3/4]

double ON_EarthAnchorPoint::Elevation ( ON::LengthUnitSystem  elevation_unit_system) const

Parameters: elevation_unit_system - [in] length unit system for returned value. Returns: Earth location elevation in degrees. Can be ON_UNSET_VALUE

◆ Elevation() [4/4]

double ON_EarthAnchorPoint::Elevation ( ON::LengthUnitSystem  elevation_unit_system,
double  unset_elevation 
) const

Parameters: elevation_unit_system - [in] length unit system for returned value. unset_elevation - [in] Value to return if the Earth location elevation is not set.

◆ ElevationInMeters()

double ON_EarthAnchorPoint::ElevationInMeters ( ) const

◆ GetKMLOrientationAnglesDegrees()

bool ON_EarthAnchorPoint::GetKMLOrientationAnglesDegrees ( double &  heading_degrees,
double &  tilt_degrees,
double &  roll_degrees 
) const

Description: Find the Keyhole Markup Language (KML) orientation angles (in degrees) of a rotation transformation that maps model (east,north,up) to ((1,0,0),(0,1,0),(0,0,1)). KML Earth Z axis = up, KML Earth X axis = east, KML Earth Y axis = north. NOTE WELL: In KML, positive rotations are CLOCKWISE looking down specified axis vector towards the origin. This is rotation direction is opposite the conventional "right hand rule." Parameters: heading_degrees - [out] angle (in degrees) of rotation around KML Earth Z axis (Earth up). NOTE WELL: In KML, positive rotations are CLOCKWISE looking down specified axis vector towards the origin. This is rotation direction is opposite the conventional "right hand rule." tilt_degrees - [out] angle (in degrees) of rotation around KML Earth X axis (Earth east). NOTE WELL: In KML, positive rotations are CLOCKWISE looking down specified axis vector towards the origin. This is rotation direction is opposite the conventional "right hand rule." roll_degrees - [out] angle (in degrees) of rotation around KML Earth Y axis (Earth north). NOTE WELL: In KML, positive rotations are CLOCKWISE looking down specified axis vector towards the origin. This is rotation direction is opposite the conventional "right hand rule." Returns: True if the model location is set (this->ModelLocationIsSet() is true) and the KML orientation angles are returned. Otherwise false is returned and all of the angle values are ON_DLB_QNAN. See Also: https://developers.google.com/kml/documentation/kmlreference#orientation

◆ GetKMLOrientationAnglesRadians()

bool ON_EarthAnchorPoint::GetKMLOrientationAnglesRadians ( double &  heading_radians,
double &  tilt_radians,
double &  roll_radians 
) const

Description: Find the Keyhole Markup Language (KML) orientation angles (in radians) of a rotation transformation that maps model (east,north,up) to ((1,0,0),(0,1,0),(0,0,1)). KML Earth Z axis = up, KML Earth X axis = east, KML Earth Y axis = north. NOTE WELL: In KML, positive rotations are CLOCKWISE looking down specified axis vector towards the origin. This is rotation direction is opposite the conventional "right hand rule." Parameters: heading_radians - [out] angle (in radians) of rotation around KML Earth Z axis (Earth up). NOTE WELL: In KML, positive rotations are CLOCKWISE looking down specified axis vector towards the origin. This is rotation direction is opposite the conventional "right hand rule." tilt_radians - [out] angle (in radians) of rotation around KML Earth X axis (Earth east). NOTE WELL: In KML, positive rotations are CLOCKWISE looking down specified axis vector towards the origin. This is rotation direction is opposite the conventional "right hand rule." roll_radians - [out] angle (in radians) of rotation around KML Earth Y axis (Earth north). NOTE WELL: In KML, positive rotations are CLOCKWISE looking down specified axis vector towards the origin. This is rotation direction is opposite the conventional "right hand rule." Returns: True if the model location is set (this->ModelLocationIsSet() is true) and the KML orientation angles are returned. Otherwise false is returned and all of the angle values are ON_DLB_QNAN. See Also: https://developers.google.com/kml/documentation/kmlreference#orientation

◆ GetModelCompass()

bool ON_EarthAnchorPoint::GetModelCompass ( ON_Plane model_compass) const

Parameters: model_compass - [out] A plane in model coordinates whose xaxis points East, yaxis points North and zaxis points up. The origin is set to m_model_basepoint.

◆ GetModelToEarthXform()

bool ON_EarthAnchorPoint::GetModelToEarthXform ( const ON_UnitSystem model_unit_system,
ON_Xform model_to_earth 
) const

Description: Get a transformation from model coordinates to earth coordinates. This transformation assumes the model is small enough that the curvature of the earth can be ignored.
Parameters: model_unit_system - [in] model_to_earth - [out] Transformation from model coordinates to earth locations (degrees latitude,degrees longitude,elevation in meters) Remarks: If M is a point in model coordinates and E = model_to_earth*M, then E.x = latitude in decimal degrees E.y = longitude in decimal degrees E.z = elevation in meters above mean sea level

Because the earth is not flat, there is a small amount of error when using a linear transformation to calculate oblate spherical coordinates. This error is small. If the distance from P to M is d meters, then the approximation error is

latitude error <= longitude error <= elevation error <= 6379000*((1 + (d/6356000)^2)-1) meters

In particular, if every point in the model is within 1000 meters of the m_model_basepoint, then the maximum approximation errors are

latitude error <= longitude error <= elevation error <= 8 centimeters

◆ KMLOrientationHeadingAngleDegrees()

const double ON_EarthAnchorPoint::KMLOrientationHeadingAngleDegrees ( ) const

Returns: If the model location is set (this->ModelLocationIsSet() is true), then the Keyhole Markup Language orientation heading angle in degrees is returned. Otherwise ON_DBL_QNAN is returned. See Also: https://developers.google.com/kml/documentation/kmlreference#orientation

◆ KMLOrientationHeadingAngleRadians()

const double ON_EarthAnchorPoint::KMLOrientationHeadingAngleRadians ( ) const

If the model location is set (this->ModelLocationIsSet() is true), then the Keyhole Markup Language orientation heading angle in radians is returned. Otherwise ON_DBL_QNAN is returned. See Also: https://developers.google.com/kml/documentation/kmlreference#orientation

◆ KMLOrientationRollAngleDegrees()

const double ON_EarthAnchorPoint::KMLOrientationRollAngleDegrees ( ) const

If the model location is set (this->ModelLocationIsSet() is true), then the Keyhole Markup Language orientation roll angle in degrees is returned. Otherwise ON_DBL_QNAN is returned. See Also: https://developers.google.com/kml/documentation/kmlreference#orientation

◆ KMLOrientationRollAngleRadians()

const double ON_EarthAnchorPoint::KMLOrientationRollAngleRadians ( ) const

Returns: If the model location is set (this->ModelLocationIsSet() is true), then the Keyhole Markup Language orientation roll angle in radians is returned. Otherwise ON_DBL_QNAN is returned. See Also: https://developers.google.com/kml/documentation/kmlreference#orientation

◆ KMLOrientationTiltAngleDegrees()

const double ON_EarthAnchorPoint::KMLOrientationTiltAngleDegrees ( ) const

Returns: If the model location is set (this->ModelLocationIsSet() is true), then the Keyhole Markup Language orientation tilt angle in degrees is returned. Otherwise ON_DBL_QNAN is returned. See Also: https://developers.google.com/kml/documentation/kmlreference#orientation

◆ KMLOrientationTiltAngleRadians()

const double ON_EarthAnchorPoint::KMLOrientationTiltAngleRadians ( ) const

Returns: If the model location is set (this->ModelLocationIsSet() is true), then the Keyhole Markup Language orientation tilt angle in radians is returned. Otherwise ON_DBL_QNAN is returned. See Also: https://developers.google.com/kml/documentation/kmlreference#orientation

◆ Latitude() [1/2]

double ON_EarthAnchorPoint::Latitude ( ) const

Returns: Earth location latitude in degrees. Can be ON_UNSET_VALUE

◆ Latitude() [2/2]

double ON_EarthAnchorPoint::Latitude ( double  unset_latitude) const

Parameters: unset_latitude - [in] Value to return if the Earth location latitude is not set. Returns: Earth location latitude in degrees.

◆ Longitude() [1/2]

double ON_EarthAnchorPoint::Longitude ( ) const

Returns: Earth location longitude in degrees. Can be ON_UNSET_VALUE

◆ Longitude() [2/2]

double ON_EarthAnchorPoint::Longitude ( double  unset_longitude) const

Parameters: unset_longitude - [in] Value to return if the Earth location latitude is not set. Returns: Earth location longitude in degrees.

◆ ModelEast()

const ON_3dVector& ON_EarthAnchorPoint::ModelEast ( ) const

◆ ModelLocationIsSet()

bool ON_EarthAnchorPoint::ModelLocationIsSet ( ) const

Returns: True if model basepoint, north and east are set.

◆ ModelNorth()

const ON_3dVector& ON_EarthAnchorPoint::ModelNorth ( ) const

◆ ModelPoint()

const ON_3dPoint& ON_EarthAnchorPoint::ModelPoint ( ) const

◆ operator=()

ON_EarthAnchorPoint& ON_EarthAnchorPoint::operator= ( const ON_EarthAnchorPoint )
default

◆ Read()

bool ON_EarthAnchorPoint::Read ( ON_BinaryArchive )

◆ SetEarthCoordinateSystem()

void ON_EarthAnchorPoint::SetEarthCoordinateSystem ( ON::EarthCoordinateSystem  earth_coordinate_system)

System used to define Earth latiude, longitude, and elevation coordinates.

◆ SetEarthLocation() [1/2]

void ON_EarthAnchorPoint::SetEarthLocation ( ON::EarthCoordinateSystem  earth_coordinate_system,
const class ON_UnitSystem elevation_unit_system,
double  latitude_degrees,
double  longitude_degrees,
double  elevation 
)

Parameters: elevation_unit_system - [in] elevation - [in]

◆ SetEarthLocation() [2/2]

void ON_EarthAnchorPoint::SetEarthLocation ( ON::EarthCoordinateSystem  earth_coordinate_system,
ON::LengthUnitSystem  elevation_unit_system,
double  latitude_degrees,
double  longitude_degrees,
double  elevation 
)

◆ SetElevation() [1/2]

void ON_EarthAnchorPoint::SetElevation ( const ON_UnitSystem elevation_unit_system,
double  elevation 
)

Parameters: elevation_unit_system - [in] elevation - [in]

◆ SetElevation() [2/2]

void ON_EarthAnchorPoint::SetElevation ( ON::LengthUnitSystem  elevation_unit_system,
double  elevation 
)

◆ SetLatitude()

void ON_EarthAnchorPoint::SetLatitude ( double  latitude_degrees)

◆ SetLatitudeAndLongitude()

void ON_EarthAnchorPoint::SetLatitudeAndLongitude ( double  latitude_degrees,
double  longitude_degrees 
)

◆ SetLongitude()

void ON_EarthAnchorPoint::SetLongitude ( double  longitude_degrees)

◆ SetModelEast()

void ON_EarthAnchorPoint::SetModelEast ( ON_3dVector  model_east)

◆ SetModelLocation()

void ON_EarthAnchorPoint::SetModelLocation ( ON_3dPoint  model_point,
ON_3dVector  model_north,
ON_3dVector  model_east 
)

◆ SetModelNorth()

void ON_EarthAnchorPoint::SetModelNorth ( ON_3dVector  model_north)

◆ SetModelPoint()

void ON_EarthAnchorPoint::SetModelPoint ( ON_3dPoint  model_point)

◆ Write()

bool ON_EarthAnchorPoint::Write ( ON_BinaryArchive ) const

Member Data Documentation

◆ m_description

ON_wString ON_EarthAnchorPoint::m_description

◆ m_id

ON_UUID ON_EarthAnchorPoint::m_id = ON_nil_uuid

Identification information about this location.

unique id for this anchor point

◆ m_name

ON_wString ON_EarthAnchorPoint::m_name

◆ m_url

ON_wString ON_EarthAnchorPoint::m_url

◆ m_url_tag

ON_wString ON_EarthAnchorPoint::m_url_tag

UI link text for m_url.

◆ SeattleSpaceNeedle

const ON_EarthAnchorPoint ON_EarthAnchorPoint::SeattleSpaceNeedle
static

Latitude, longitude, and elevation are the Seattle Space Needle.

◆ Unset

const ON_EarthAnchorPoint ON_EarthAnchorPoint::Unset
static

Latitude, longitude, and elevation are ON_UNSET_VALUE.