alaCarte Maps
Renderer for OpenStreetMap tiles
basic_vector2< T > Class Template Reference

#include <point.hpp>

Public Member Functions

 basic_vector2 ()
 
 basic_vector2 (const basic_vector2 &_v)=default
 
 basic_vector2 (basic_vector2 &&_v)=default
 
 basic_vector2 (const T _v)
 
 basic_vector2 (const T _x, const T _y)
 
 operator float * ()
 
basic_vector2operator= (const basic_vector2 &v)=default
 
basic_vector2operator= (basic_vector2 &&v)=default
 
basic_vector2operator+= (const basic_vector2 &v)
 
basic_vector2operator-= (const basic_vector2 &v)
 
basic_vector2operator*= (const basic_vector2 &v)
 
basic_vector2operator*= (const T f)
 
basic_vector2operator/= (const basic_vector2 &v)
 
basic_vector2operator/= (const T f)
 
basic_vector2 operator+ (const basic_vector2 &v) const
 
basic_vector2 operator- (const basic_vector2 &v) const
 
basic_vector2 operator- () const
 
basic_vector2 operator* (const basic_vector2 &v) const
 
basic_vector2 operator* (const T f) const
 
basic_vector2 operator/ (const basic_vector2 &v) const
 
basic_vector2 operator/ (const T f) const
 
bool operator== (const basic_vector2 &v) const
 
bool operator!= (const basic_vector2 &v) const
 
double distance (const basic_vector2 &v) const
 
double distanceQuad (const basic_vector2 &v) const
 
bool isInRange (const basic_vector2 &v, double epsilon=0.000000001) const
 
 operator basic_vector2< int > () const
 
 operator basic_vector2< float > () const
 
 operator basic_vector2< double > () const
 
area () const
 

Public Attributes

union {
   struct {
      T   x
 
      T   y
 
   } 
 
   struct {
      T   lon
 
      T   lat
 
   } 
 
   struct {
      T   w
 
      T   h
 
   } 
 
   T   c [2]
 
}; 
 

Private Member Functions

template<typename Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 

Detailed Description

template<typename T>
class basic_vector2< T >

Definition at line 32 of file point.hpp.

Constructor & Destructor Documentation

template<typename T>
basic_vector2< T >::basic_vector2 ( )
inline

Definition at line 42 of file point.hpp.

template<typename T>
basic_vector2< T >::basic_vector2 ( const basic_vector2< T > &  _v)
default
template<typename T>
basic_vector2< T >::basic_vector2 ( basic_vector2< T > &&  _v)
default
template<typename T>
basic_vector2< T >::basic_vector2 ( const T  _v)
inline

Definition at line 45 of file point.hpp.

template<typename T>
basic_vector2< T >::basic_vector2 ( const T  _x,
const T  _y 
)
inline

Definition at line 46 of file point.hpp.

Member Function Documentation

template<typename T>
T basic_vector2< T >::area ( ) const
inline

Definition at line 82 of file point.hpp.

template<typename T>
double basic_vector2< T >::distance ( const basic_vector2< T > &  v) const
inline

Definition at line 74 of file point.hpp.

template<typename T>
double basic_vector2< T >::distanceQuad ( const basic_vector2< T > &  v) const
inline

Definition at line 75 of file point.hpp.

template<typename T>
bool basic_vector2< T >::isInRange ( const basic_vector2< T > &  v,
double  epsilon = 0.000000001 
) const
inline

Definition at line 76 of file point.hpp.

template<typename T>
basic_vector2< T >::operator basic_vector2< double > ( ) const
inline

Definition at line 80 of file point.hpp.

template<typename T>
basic_vector2< T >::operator basic_vector2< float > ( ) const
inline

Definition at line 79 of file point.hpp.

template<typename T>
basic_vector2< T >::operator basic_vector2< int > ( ) const
inline

Definition at line 78 of file point.hpp.

template<typename T>
basic_vector2< T >::operator float * ( )
inline

Definition at line 49 of file point.hpp.

template<typename T>
bool basic_vector2< T >::operator!= ( const basic_vector2< T > &  v) const
inline

Definition at line 72 of file point.hpp.

template<typename T>
basic_vector2 basic_vector2< T >::operator* ( const basic_vector2< T > &  v) const
inline

Definition at line 65 of file point.hpp.

template<typename T>
basic_vector2 basic_vector2< T >::operator* ( const T  f) const
inline

Definition at line 66 of file point.hpp.

template<typename T>
basic_vector2& basic_vector2< T >::operator*= ( const basic_vector2< T > &  v)
inline

Definition at line 56 of file point.hpp.

template<typename T>
basic_vector2& basic_vector2< T >::operator*= ( const T  f)
inline

Definition at line 57 of file point.hpp.

template<typename T>
basic_vector2 basic_vector2< T >::operator+ ( const basic_vector2< T > &  v) const
inline

Definition at line 62 of file point.hpp.

template<typename T>
basic_vector2& basic_vector2< T >::operator+= ( const basic_vector2< T > &  v)
inline

Definition at line 54 of file point.hpp.

template<typename T>
basic_vector2 basic_vector2< T >::operator- ( const basic_vector2< T > &  v) const
inline

Definition at line 63 of file point.hpp.

template<typename T>
basic_vector2 basic_vector2< T >::operator- ( ) const
inline

Definition at line 64 of file point.hpp.

template<typename T>
basic_vector2& basic_vector2< T >::operator-= ( const basic_vector2< T > &  v)
inline

Definition at line 55 of file point.hpp.

template<typename T>
basic_vector2 basic_vector2< T >::operator/ ( const basic_vector2< T > &  v) const
inline

Definition at line 67 of file point.hpp.

template<typename T>
basic_vector2 basic_vector2< T >::operator/ ( const T  f) const
inline

Definition at line 68 of file point.hpp.

template<typename T>
basic_vector2& basic_vector2< T >::operator/= ( const basic_vector2< T > &  v)
inline

Definition at line 58 of file point.hpp.

template<typename T>
basic_vector2& basic_vector2< T >::operator/= ( const T  f)
inline

Definition at line 59 of file point.hpp.

template<typename T>
basic_vector2& basic_vector2< T >::operator= ( const basic_vector2< T > &  v)
default
template<typename T>
basic_vector2& basic_vector2< T >::operator= ( basic_vector2< T > &&  v)
default
template<typename T>
bool basic_vector2< T >::operator== ( const basic_vector2< T > &  v) const
inline

Definition at line 71 of file point.hpp.

template<typename T>
template<typename Archive >
void basic_vector2< T >::serialize ( Archive ar,
const unsigned int  version 
)
inlineprivate

Definition at line 37 of file point.hpp.

Friends And Related Function Documentation

template<typename T>
friend class boost::serialization::access
friend

Definition at line 35 of file point.hpp.

Member Data Documentation

union { ... }
template<typename T>
T basic_vector2< T >::c[2]

Definition at line 104 of file point.hpp.

template<typename T>
T basic_vector2< T >::h

Definition at line 101 of file point.hpp.

template<typename T>
T basic_vector2< T >::lat

Definition at line 95 of file point.hpp.

template<typename T>
T basic_vector2< T >::lon

Definition at line 94 of file point.hpp.

template<typename T>
T basic_vector2< T >::w

Definition at line 100 of file point.hpp.

template<typename T>
T basic_vector2< T >::x

Definition at line 88 of file point.hpp.

template<typename T>
T basic_vector2< T >::y

Definition at line 89 of file point.hpp.


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