Macros | Functions
vgl_vector_2d.hxx File Reference
#include <cmath>
#include <iostream>
#include <string>
#include "vgl_vector_2d.h"

Go to the source code of this file.

Macros

#define VGL_VECTOR_2D_INSTANTIATE(T)
 

Functions

template<class T >
double angle (vgl_vector_2d< T > const &a, vgl_vector_2d< T > const &b)
 
template<class T >
double signed_angle (vgl_vector_2d< T > const &a, vgl_vector_2d< T > const &b)
 
template<class T >
bool orthogonal (vgl_vector_2d< T > const &a, vgl_vector_2d< T > const &b, double eps)
 
template<class T >
bool parallel (vgl_vector_2d< T > const &a, vgl_vector_2d< T > const &b, double eps)
 
template<class T >
vgl_vector_2d< T > rotated (vgl_vector_2d< T > const &a, double angle)
 
template<class T >
std::ostream & operator<< (std::ostream &s, vgl_vector_2d< T > const &p)
 Write "<vgl_vector_2d x,y> " to stream. More...
 
template<class T >
std::istream & operator>> (std::istream &is, vgl_vector_2d< T > &p)
 Read x y from stream. More...
 

Macro Definition Documentation

◆ VGL_VECTOR_2D_INSTANTIATE

#define VGL_VECTOR_2D_INSTANTIATE (   T)
Value:
template class vgl_vector_2d<T >;\
/*template vgl_vector_2d<T > operator+ (vgl_vector_2d<T > const&, vgl_vector_2d<T > const&); */\
/*template vgl_vector_2d<T > operator- (vgl_vector_2d<T > const&, vgl_vector_2d<T > const&); */\
/*template vgl_vector_2d<T >& operator+= (vgl_vector_2d<T >&, vgl_vector_2d<T > const&); */\
/*template vgl_vector_2d<T >& operator-= (vgl_vector_2d<T >&, vgl_vector_2d<T > const&); */\
/*template vgl_vector_2d<T > operator+ (vgl_vector_2d<T > const&); */\
/*template vgl_vector_2d<T > operator- (vgl_vector_2d<T > const&); */\
/*template vgl_vector_2d<T > operator* (double, vgl_vector_2d<T > const&); */\
/*template vgl_vector_2d<T > operator* (vgl_vector_2d<T > const&, double); */\
/*template vgl_vector_2d<T > operator/ (vgl_vector_2d<T > const&, double); */\
/*template vgl_vector_2d<T >& operator*= (vgl_vector_2d<T >&, double); */\
/*template vgl_vector_2d<T >& operator/= (vgl_vector_2d<T >&, double); */\
/*template T dot_product (vgl_vector_2d<T > const&, vgl_vector_2d<T > const&); */\
/*template T inner_product(vgl_vector_2d<T > const&, vgl_vector_2d<T > const&); */\
/*template T cross_product(vgl_vector_2d<T > const&, vgl_vector_2d<T > const&); */\
/*template double cos_angle (vgl_vector_2d<T > const&, vgl_vector_2d<T > const&); */\
template double angle (vgl_vector_2d<T > const&, vgl_vector_2d<T > const&);\
template double signed_angle (vgl_vector_2d<T > const&, vgl_vector_2d<T > const&);\
template bool orthogonal (vgl_vector_2d<T > const&, vgl_vector_2d<T > const&, double);\
template bool parallel (vgl_vector_2d<T > const&, vgl_vector_2d<T > const&, double);\
/*template double operator/ (vgl_vector_2d<T > const&, vgl_vector_2d<T > const&); */\
/*template vgl_vector_2d<T >& normalize (vgl_vector_2d<T >&); */\
/*template vgl_vector_2d<T > normalized (vgl_vector_2d<T > const&); */\
template vgl_vector_2d<T > rotated (vgl_vector_2d<T > const&, double);\
template std::ostream& operator<< (std::ostream&, vgl_vector_2d<T >const&);\
template std::istream& operator>> (std::istream&, vgl_vector_2d<T >&)
Direction vector in Euclidean 2D space, templated by type of element.
Definition: vgl_fwd.h:12
bool orthogonal(v const &a, v const &b, double eps=0.0)
are two vectors orthogonal, i.e., is their dot product zero?.
std::ostream & operator<<(std::ostream &s, vgl_orient_box_3d< Type > const &p)
Write box to stream.
v rotated(v const &a, double angle)
Return a CCW rotated version of a (angle in radian).
double signed_angle(v const &a, v const &b)
signed angle between two vectors (in radians, between -Pi and Pi).
std::istream & operator>>(std::istream &is, vgl_orient_box_3d< Type > &p)
Read box from stream.
double angle(v const &a, v const &b)
smallest angle between two vectors (in radians, between 0 and Pi).
bool parallel(v const &a, v const &b, double eps=0.0)
are two vectors parallel, i.e., is one a scalar multiple of the other?.

Definition at line 129 of file vgl_vector_2d.hxx.

Function Documentation

◆ angle()

template<class T >
double angle ( vgl_vector_2d< T > const &  a,
vgl_vector_2d< T > const &  b 
)

Definition at line 23 of file vgl_vector_2d.hxx.

◆ operator<<()

template<class T >
std::ostream& operator<< ( std::ostream &  s,
vgl_vector_2d< T > const &  p 
)

Write "<vgl_vector_2d x,y> " to stream.

Definition at line 66 of file vgl_vector_2d.hxx.

◆ operator>>()

template<class T >
std::istream& operator>> ( std::istream &  is,
vgl_vector_2d< T > &  p 
)

Read x y from stream.

Definition at line 122 of file vgl_vector_2d.hxx.

◆ orthogonal()

template<class T >
bool orthogonal ( vgl_vector_2d< T > const &  a,
vgl_vector_2d< T > const &  b,
double  eps 
)

Definition at line 37 of file vgl_vector_2d.hxx.

◆ parallel()

template<class T >
bool parallel ( vgl_vector_2d< T > const &  a,
vgl_vector_2d< T > const &  b,
double  eps 
)

Definition at line 47 of file vgl_vector_2d.hxx.

◆ rotated()

template<class T >
vgl_vector_2d<T> rotated ( vgl_vector_2d< T > const &  a,
double  angle 
)

Definition at line 57 of file vgl_vector_2d.hxx.

◆ signed_angle()

template<class T >
double signed_angle ( vgl_vector_2d< T > const &  a,
vgl_vector_2d< T > const &  b 
)

Definition at line 30 of file vgl_vector_2d.hxx.