Easy3D 2.5.3
Vec< 4, T > Class Template Reference

A 4D vector (used for representing 3D points or vectors in homogeneous coordinates). More...

#include <easy3d/core/vec.h>

Public Types

typedef Vec< 4, T > thisclass
 
typedef T FT
 

Public Member Functions

 Vec (const Vec< 3, T > &v, const T &s=1)
 
 Vec (T x_in, T y_in, T z_in, T w_in)
 
 Vec (const T &s)
 
template<class T2 >
 Vec (const Vec< 4, T2 > &v)
 
template<class T2 >
 Vec (const T2 *v)
 
length2 () const
 
length () const
 
norm () const
 
distance2 (const thisclass &rhs) const
 
thisclassnormalize ()
 
size_t dimension () const
 
size_t size () const
 
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
 
T * data ()
 
const T * data () const
 
Vec< 3, T > xyz () const
 
 operator const T * () const
 
 operator T* ()
 

Public Attributes

union easy3d::Vec< 4, T >:: { ... }  
 
_array [4]
 
x
 
y
 
z
 
w
 
r
 
g
 
b
 
a
 

Detailed Description

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

A 4D vector (used for representing 3D points or vectors in homogeneous coordinates).

Template Parameters
TThe scalar type of vector elements.

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