Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ion::SLongitudeLatitude< T > Struct Template Reference

#include <SLongitudeLatitude.h>

Inheritance diagram for ion::SLongitudeLatitude< T >:
Inheritance graph
[legend]
Collaboration diagram for ion::SLongitudeLatitude< T >:
Collaboration graph
[legend]

Classes

class  CEquirectangularProjection
 
class  CHaversineProjection
 
class  CVincentyProjection
 
class  IProjectionSystem
 

Public Member Functions

 SLongitudeLatitude ()
 Default constructor. More...
 
 SLongitudeLatitude (T const lon, T const lat)
 Explicit constructor. More...
 
 SLongitudeLatitude (SLongitudeLatitude< T > const &vec)
 Copy constructor. More...
 
SLongitudeLatitude< T > & operator= (SLongitudeLatitude< T > const &vec)
 Assignment operator. More...
 
vec2f Vector () const
 
T DistanceTo (SLongitudeLatitude const &Other, SharedPointer< IProjectionSystem > Projection=SharedFromNew(new CHaversineProjection())) const
 
vec2< TOffsetTo (SLongitudeLatitude const &Other, SharedPointer< IProjectionSystem > Projection=SharedFromNew(new CHaversineProjection())) const
 
- Public Member Functions inherited from ion::vec2< T >
 vec2 ()
 Default constructor. More...
 
 vec2 (T const in)
 Scalar constructor. More...
 
 vec2 (T const x, T const y)
 Explicit constructor. More...
 
template<typename U >
 vec2 (glm::tvec2< U, glm::defaultp > const &v)
 GLM constructor. More...
 
template<typename U >
 vec2 (vec2< U > const &vec)
 Generic vec2 constructor. More...
 
T operator[] (int i) const
 Note: Out-of-bounds access returns a dummy value without error. More...
 
Toperator[] (int i)
 Note: Out-of-bounds access returns a dummy value without error. More...
 
template<typename U >
vec2< T > & operator= (vec2< U > const &vec)
 Generic vector assignment operator. More...
 
void reset ()
 Sets all values to 0. More...
 
void set (T const in)
 Sets all values to a single scalar. More...
 
void set (T const in[])
 Sets all values by an input C-style array. More...
 
template<typename U >
void set (vec2< U > const &other)
 Sets all values by an input vector. More...
 
T Length () const
 Length of vector. More...
 
T LengthSq () const
 Squared-length of vector (computationally fast) More...
 
T Dot (vec2< T > const &other) const
 
T GetDistanceFrom (vec2< T > const &v) const
 
T const GetDistanceSqFrom (vec2< T > const &v) const
 
template<typename Real >
vec2< TGetInterpolated (vec2< T > const &v, Real const d) const
 
vec2< TGetNormalized () const
 
vec2< T > & Normalize ()
 Normalize this vector. More...
 
vec2< Toperator+ (vec2< T > const &v) const
 
vec2< Toperator- (vec2< T > const &v) const
 
vec2< Toperator* (vec2< T > const &v) const
 
vec2< Toperator/ (vec2< T > const &v) const
 
vec2< Toperator+ (T const s) const
 
vec2< Toperator- (T const s) const
 
vec2< Toperator* (T const s) const
 
vec2< Toperator/ (T const s) const
 
vec2< T > & operator+= (vec2< T > const &v)
 
vec2< T > & operator-= (vec2< T > const &v)
 
vec2< T > & operator*= (vec2< T > const &v)
 
vec2< T > & operator/= (vec2< T > const &v)
 
vec2< T > & operator+= (T const s)
 
vec2< T > & operator-= (T const s)
 
vec2< T > & operator*= (T const s)
 
vec2< T > & operator/= (T const s)
 
vec2< T > const operator- () const
 
bool operator< (vec2< T > const &v) const
 
bool operator== (vec2< T > const &v) const
 
bool operator!= (vec2< T > const &v) const
 
bool Equals (vec2< T > const &v, T const Epsilon=RoundingError< T >::Value()) const
 
glm::vec2 const ToGLM () const
 
vec2< TYX () const
 
vec2< TXX () const
 
vec2< TYY () const
 
vec2< TRotate (T const radians) const
 
T GetAngle () const
 
vec2< TRotate90CW () const
 
vec2< TRotate90CCW () const
 

Static Public Member Functions

static T DMStoDecimal (T const Degrees, T const Minutes, T const Seconds, ECompassDirection const Direction=ECompassDirection::N)
 
static void DecimalToDMS (T const Decimal, T &Degrees, T &Minutes, T &Seconds)
 
static T DMStoDecimal (std::string const &String)
 
- Static Public Member Functions inherited from ion::vec2< T >
static vec2< TFromGLM (glm::vec2 const &Vec)
 

Public Attributes

TLongitude
 
TLatitude
 
- Public Attributes inherited from ion::vec2< T >
T X
 
T Y
 

Constructor & Destructor Documentation

template<typename T>
ion::SLongitudeLatitude< T >::SLongitudeLatitude ( )
inline

Default constructor.

template<typename T>
ion::SLongitudeLatitude< T >::SLongitudeLatitude ( T const  lon,
T const  lat 
)
inline

Explicit constructor.

template<typename T>
ion::SLongitudeLatitude< T >::SLongitudeLatitude ( SLongitudeLatitude< T > const &  vec)
inline

Copy constructor.

Member Function Documentation

template<typename T>
static void ion::SLongitudeLatitude< T >::DecimalToDMS ( T const  Decimal,
T Degrees,
T Minutes,
T Seconds 
)
inlinestatic
template<typename T>
T ion::SLongitudeLatitude< T >::DistanceTo ( SLongitudeLatitude< T > const &  Other,
SharedPointer< IProjectionSystem Projection = SharedFromNew(new CHaversineProjection()) 
) const
inline
template<typename T>
static T ion::SLongitudeLatitude< T >::DMStoDecimal ( T const  Degrees,
T const  Minutes,
T const  Seconds,
ECompassDirection const  Direction = ECompassDirection::N 
)
inlinestatic
template<typename T>
static T ion::SLongitudeLatitude< T >::DMStoDecimal ( std::string const &  String)
inlinestatic
template<typename T>
vec2<T> ion::SLongitudeLatitude< T >::OffsetTo ( SLongitudeLatitude< T > const &  Other,
SharedPointer< IProjectionSystem Projection = SharedFromNew(new CHaversineProjection()) 
) const
inline
template<typename T>
SLongitudeLatitude<T>& ion::SLongitudeLatitude< T >::operator= ( SLongitudeLatitude< T > const &  vec)
inline

Assignment operator.

template<typename T>
vec2f ion::SLongitudeLatitude< T >::Vector ( ) const
inline

Member Data Documentation

template<typename T>
T& ion::SLongitudeLatitude< T >::Latitude
template<typename T>
T& ion::SLongitudeLatitude< T >::Longitude

The documentation for this struct was generated from the following file: