EarthViewpoint Struct Reference

API: cOsgCanvas::EarthViewpoint Struct Reference
API
cOsgCanvas::EarthViewpoint Struct Reference

Public Member Functions

Methods.
 EarthViewpoint (double longitude, double latitude, double altitude, double heading, double pitch, double range)

Public Attributes

Data members.
double altitude = 0
 The location of the "focal point".
double range = 0
 The distance and angle of the camera.
bool valid = false
 The validity of the data. If false, the other members should not be read.

Description

Defines a viewpoint in 3D space with geographical coordinates, for osgEarth-style viewing.

The EarthViewpoint is defined by a "focal point" on (or above) the Earth's surface (longitude, latitude, altitude), and two angles (heading, pitch) and a distance (range). The camera always looks at the "focal point", from a distance defined by range, and at an angle defined by heading and pitch.

Constructor & Destructor Documentation

◆ EarthViewpoint()

EarthViewpoint ( double longitude,
double latitude,
double altitude,
double heading,
double pitch,
double range )
inline

Note the order of the first two parameters: longitude comes first, latitude is next. It is kept this way to remain consistent with osgEarth::Viewpoint, and to resemble the directions in the X:Y:Z coordinate systems. They are in reverse order almost everywhere else, so always pay attention to whether you need to flip them around or not.

References altitude, range, and valid.

Member Data Documentation

◆ altitude

double altitude = 0

The location of the "focal point".

Referenced by EarthViewpoint().

◆ range

double range = 0

The distance and angle of the camera.

Referenced by EarthViewpoint().

◆ valid

bool valid = false

The validity of the data. If false, the other members should not be read.

Referenced by EarthViewpoint().