Easy3D 2.5.3
Vec< 2, T > Class Template Reference

A 2D vector (used for representing 2D points or vectors). More...

#include <easy3d/core/vec.h>

Public Types

typedef Vec< 2, T > thisclass
 
typedef T FT
 

Public Member Functions

 Vec (T x_in, T y_in)
 
 Vec (const Vec< 3, T > &v)
 
 Vec (const T &s)
 
template<class T2 >
 Vec (const Vec< 2, T2 > &v)
 
template<class T2 >
 Vec (const T2 *v)
 
length2 () const
 
length () const
 
norm () const
 
distance2 (const thisclass &rhs) const
 
thisclassnormalize ()
 
thisclassoperator+= (const thisclass &v)
 
thisclassoperator-= (const thisclass &v)
 
thisclassoperator*= (const thisclass &v)
 
thisclassoperator/= (const thisclass &v)
 
template<class T2 >
thisclassoperator*= (T2 s)
 
template<class T2 >
thisclassoperator/= (T2 s)
 
thisclass operator+ (const thisclass &v) const
 
thisclass operator- (const thisclass &v) const
 
template<class T2 >
thisclass operator* (T2 s) const
 
template<class T2 >
thisclass operator/ (T2 s) const
 
thisclass operator- () const
 
size_t dimension () const
 
size_t size () const
 
T * data ()
 
const T * data () const
 
 operator const T * () const
 
 operator T* ()
 

Public Attributes

union easy3d::Vec< 2, T >:: { ... }  
 
_array [2]
 
x
 
y
 
u
 
v
 

Detailed Description

template<class T>
class easy3d::Vec< 2, T >

A 2D vector (used for representing 2D points or vectors).

Template Parameters
TThe scalar type of vector elements.

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