All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Namespaces | Classes | Functions
Eegeo::Space Namespace Reference

Contains types and helper functions relating to coordinate space manipulation. More...

Namespaces

namespace  CubeMap
 Types and helper functions relating to projecting Earth sphere to and from a cube.
 
namespace  SpaceHelpers
 Helper functions for coordinate conversion operations.
 

Classes

class  EarthConstants
 Physical constants for Earth. More...
 
class  EcefTangentBasis
 Defines an orthogonal coordindate basis in ECEF space. More...
 
class  IndoorGeoreferencer
 
class  LatLong
 
class  LatLongAltitude
 
class  WeightedLatLongAltitude
 

Functions

v3 ConvertLatLongAltitudeToScreenCoordinates (const LatLongAltitude &latLongAltitude, const Eegeo::Camera::RenderCamera &renderCamera, const Eegeo::Rendering::ScreenProperties &screenProperties)
 
bool TryConvertScreenCoordinatesToLatLongAltitude (int screenPixelCoordinateX, int screenPixelCoordinateY, const Eegeo::Camera::RenderCamera &renderCamera, const Eegeo::Resources::Terrain::Heights::TerrainHeightProvider &terrainHeightProvider, LatLongAltitude &result)
 
Eegeo::dv3 ConvertLatLongAltitudeToEcef (double latitudeInRadians, double longitudeInRadians, double altitudeInMetres)
 
dv3 ConvertLatLongAltitudeToEcef (const LatLongAltitude &latLongAltitude)
 
Eegeo::Streaming::MortonKey ConvertLatLongAltitudeToMortonKey (const LatLongAltitude &latLongAltitude, int level)
 
LatLongAltitude ConvertEcefToLatLongAltitude (double x, double y, double z)
 
LatLongAltitude ConvertEcefToLatLongAltitude (const dv3 &ecefPosition)
 
dv3 ConvertMortonKeyCenterToEcef (const Eegeo::Streaming::MortonKey &key)
 
double DistanceInMetresBetweenEcefPoints (const Eegeo::dv3 &ecefPointA, const Eegeo::dv3 &ecefPointB)
 
double SignedArea (const std::vector< Eegeo::Space::LatLongAltitude > &points)
 

Detailed Description

Contains types and helper functions relating to coordinate space manipulation.

Function Documentation

LatLongAltitude Eegeo::Space::ConvertEcefToLatLongAltitude ( double  x,
double  y,
double  z 
)
inline

Convert an Ecef position to LatLongAltitude

Parameters
xEcef x coordinate
yEcef y coordinate
zEcef z coordinate
Returns
converted LatLongAltitude
LatLongAltitude Eegeo::Space::ConvertEcefToLatLongAltitude ( const dv3 &  ecefPosition)
inline

Convert an Ecef position to LatLongAltitude

Parameters
ecefPositionThe Ecef position to be converted
Returns
converted LatLongAltitude
Eegeo::dv3 Eegeo::Space::ConvertLatLongAltitudeToEcef ( double  latitudeInRadians,
double  longitudeInRadians,
double  altitudeInMetres 
)
inline

Convert latitude, longitude and altitude to Ecef

Parameters
latitudeInRadiansThe latitude in radians
longitudeInRadiansThe longitude in radians
altitudeInMetresThe altitude in metres
Returns
converted Ecef coordinate
dv3 Eegeo::Space::ConvertLatLongAltitudeToEcef ( const LatLongAltitude &  latLongAltitude)
inline

Convert a LatLongAltitude instance to Ecef

Parameters
latLongAltitudeThe LatLongAltitude to be converted
Returns
converted Ecef coordinate
Eegeo::Streaming::MortonKey Eegeo::Space::ConvertLatLongAltitudeToMortonKey ( const LatLongAltitude &  latLongAltitude,
int  level 
)
inline

Convert a LatLongAltitude instance to MortonKey

Parameters
latLongAltitudeThe LatLongAltitude to be converted
levelThe cubemap level for which the morton key is to be computed
Returns
the key
v3 Eegeo::Space::ConvertLatLongAltitudeToScreenCoordinates ( const LatLongAltitude &  latLongAltitude,
const Eegeo::Camera::RenderCamera renderCamera,
const Eegeo::Rendering::ScreenProperties screenProperties 
)

Convert a lat long altitude to Screen Space pixel coordinates.

Parameters
latLongAltitudethe lat long altitude to be converted
renderCamerathe render camera
screenPropertiesthe screen properties
Returns
a 3 component vector. The (x,y) pixel coordinates are returned as the .x and .y components of this vector. The NDC (Normalized Device Coordinate) Z coordinate is returned as the .z coordinate. If the .z component of the returned vector is positive, the projected lat long altitude is in front of the camera. If the .z component is negative, it is behind.
dv3 Eegeo::Space::ConvertMortonKeyCenterToEcef ( const Eegeo::Streaming::MortonKey key)
inline

Convert a MortonKey centre to ECEF

Parameters
keyThe morton key whose center is to be converted to ECEF
Returns
converted ECEF position
double Eegeo::Space::DistanceInMetresBetweenEcefPoints ( const Eegeo::dv3 ecefPointA,
const Eegeo::dv3 ecefPointB 
)

Calculates the Euclidean distance in metres between two Ecef points.

Parameters
ecefPointAThe first Ecef point
ecefPointBThe second Ecef point
Returns
The Euclidean distance in metres between the two points.
bool Eegeo::Space::TryConvertScreenCoordinatesToLatLongAltitude ( int  screenPixelCoordinateX,
int  screenPixelCoordinateY,
const Eegeo::Camera::RenderCamera renderCamera,
const Eegeo::Resources::Terrain::Heights::TerrainHeightProvider terrainHeightProvider,
LatLongAltitude &  result 
)

Try to convert screen space pixel coordinates into a lat long altitude.

Parameters
screenPixelCoordinateXthe x pixel coordinate
screenPixelCoordinateYthe y pixel coordinate
renderCamerarender camera
terrainHeightProviderthe terrain height provider
resultreference to a LatLongAltitude instance that, when a conversion is possible, will be filled out with the result. Check the return value to determine whether this result is valid.
Returns
a boolean indicating whether the conversion was successful. If this boolean is true, the result is valid. If it is false, the result should not be used, as the conversion failed.