Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Protected Attributes | List of all members
vtLocalConversion Class Reference

#include <LocalConversion.h>

Public Member Functions

void Setup (LinearUnits units, const DRECT &earthextents)
 
void SetOrigin (const DPoint2 &origin)
 
void convert_earth_to_local_xz (double ex, double ey, float &x, float &z) const
 
void convert_local_xz_to_earth (float x, float z, double &ex, double &ey) const
 
void ConvertToEarth (const FPoint3 &world, DPoint3 &earth) const
 
void ConvertToEarth (float x, float z, DPoint2 &earth) const
 
void ConvertFromEarth (const DPoint2 &earth, float &x, float &z) const
 
void ConvertFromEarth (const DPoint3 &earth, FPoint3 &world) const
 
void ConvertFromEarth (const DRECT &earth, FRECT &world) const
 
void ConvertVectorToEarth (float x, float z, DPoint2 &earth) const
 
void ConvertVectorFromEarth (const DPoint2 &earth, float &x, float &z) const
 
LinearUnits GetUnits () const
 

Protected Attributes

LinearUnits m_units
 
DPoint2 m_EarthOrigin
 
DPoint2 m_scale
 

Detailed Description

The following class represents a mapping between real earth coordinates (geographic or projected, elevation in meters) and a local, meters-based 3D coordinate system, which uses the right-handed OpenGL axis convention (X right, Y up, Z backwards)

Member Function Documentation

void vtLocalConversion::ConvertFromEarth ( const DPoint2 earth,
float &  x,
float &  z 
) const

Convert from earth coodinates (map coordinates, altitude in meters) to the coordinate system of the virtual world (x,y,z)

void vtLocalConversion::ConvertFromEarth ( const DPoint3 earth,
FPoint3 world 
) const

Convert from earth coodinates (map coordinates, altitude in meters) to the coordinate system of the virtual world (x,y,z)

void vtLocalConversion::ConvertFromEarth ( const DRECT earth,
FRECT world 
) const

Convert from earth coodinates (map coordinates, altitude in meters) to the coordinate system of the virtual world (x,y,z)

void vtLocalConversion::ConvertToEarth ( const FPoint3 world,
DPoint3 earth 
) const

Convert from the coordinate system of the virtual world (x,y,z) to actual earth coodinates (map coordinates, altitude in meters)

void vtLocalConversion::ConvertToEarth ( float  x,
float  z,
DPoint2 earth 
) const

Convert from the coordinate system of the virtual world (x,y,z) to actual earth coodinates (map coordinates, altitude in meters)

void vtLocalConversion::ConvertVectorFromEarth ( const DPoint2 earth,
float &  x,
float &  z 
) const

Convert a vector from earth coodinates (map coordinates, altitude in meters) to the coordinate system of the virtual world (x,y,z)

void vtLocalConversion::ConvertVectorToEarth ( float  x,
float  z,
DPoint2 earth 
) const

Convert a vector from the coordinate system of the virtual world (x,y,z) to actual earth coodinates (map coordinates, altitude in meters)


The documentation for this class was generated from the following files: