ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
Tuple4Tpl< Type > Class Template Reference

4-Tuple structure (templated version) More...

#include <CVGeom.h>

Inheritance diagram for Tuple4Tpl< Type >:
[legend]

Public Member Functions

std::size_t rows () const
 
std::size_t dimensions () const
 
Type * data ()
 
const Type * data () const
 
 Tuple4Tpl ()
 Default constructor. More...
 
 Tuple4Tpl (Type a, Type b, Type c, Type d)
 Constructor from a triplet of values. More...
 
 Tuple4Tpl (const Type p[])
 Constructor from an array of 4 elements. More...
 
 Tuple4Tpl (const Eigen::Matrix< float, 4, 1 > &v)
 Copy Function. More...
 
 Tuple4Tpl (const Eigen::Matrix< double, 4, 1 > &v)
 
Tuple4Tpl & operator= (const Eigen::Matrix< float, 4, 1 > &v)
 Assignment Function. More...
 
Tuple4Tpl & operator= (const Eigen::Matrix< double, 4, 1 > &v)
 
Tuple4Tpl operator- () const
 Inverse operator. More...
 
Tuple4Tpl & operator+= (const Tuple4Tpl &v)
 In-place addition operator. More...
 
Tuple4Tpl & operator-= (const Tuple4Tpl &v)
 In-place subtraction operator. More...
 
Tuple4Tpl & operator*= (Type v)
 In-place multiplication (by a scalar) operator. More...
 
Tuple4Tpl & operator/= (Type v)
 In-place division (by a scalar) operator. More...
 
Tuple4Tpl operator+ (const Tuple4Tpl &v) const
 Addition operator. More...
 
Tuple4Tpl operator- (const Tuple4Tpl &v) const
 Subtraction operator. More...
 
Tuple4Tpl operator* (Type s) const
 Multiplication operator. More...
 
Tuple4Tpl operator/ (Type s) const
 Division operator. More...
 
Type & operator[] (unsigned i)
 Direct coordinate access. More...
 
const Type & operator[] (unsigned i) const
 Direct coordinate access (const) More...
 
Type & operator() (unsigned i)
 Direct coordinate access. More...
 
const Type & operator() (unsigned i) const
 Direct coordinate access (const) More...
 

Static Public Member Functions

static Tuple4Tpl fromArray (const Eigen::Matrix< Type, 4, 1 > &a)
 Constructor from a Eigen vector. More...
 
static Eigen::Matrix< Type, 4, 1 > fromArray (const Tuple4Tpl< float > &a)
 
static Eigen::Matrix< Type, 4, 1 > fromArray (const Tuple4Tpl< double > &a)
 

Public Attributes

union {
   struct {
      Type   x
 
      Type   y
 
      Type   z
 
      Type   w
 
   } 
 
   Type   u [4]
 
}; 
 

Detailed Description

template<class Type>
class Tuple4Tpl< Type >

4-Tuple structure (templated version)

Constructor & Destructor Documentation

◆ Tuple4Tpl() [1/5]

template<class Type >
Tuple4Tpl< Type >::Tuple4Tpl ( )
inline

◆ Tuple4Tpl() [2/5]

template<class Type >
Tuple4Tpl< Type >::Tuple4Tpl ( Type  a,
Type  b,
Type  c,
Type  d 
)
inline

Constructor from a triplet of values.

Inits typle to (a,b,c).

◆ Tuple4Tpl() [3/5]

template<class Type >
Tuple4Tpl< Type >::Tuple4Tpl ( const Type  p[])
inlineexplicit

Constructor from an array of 4 elements.

◆ Tuple4Tpl() [4/5]

template<class Type >
Tuple4Tpl< Type >::Tuple4Tpl ( const Eigen::Matrix< float, 4, 1 > &  v)
inline

Copy Function.

◆ Tuple4Tpl() [5/5]

template<class Type >
Tuple4Tpl< Type >::Tuple4Tpl ( const Eigen::Matrix< double, 4, 1 > &  v)
inline

Member Function Documentation

◆ data() [1/2]

template<class Type >
Type* Tuple4Tpl< Type >::data ( )
inline

◆ data() [2/2]

template<class Type >
const Type* Tuple4Tpl< Type >::data ( ) const
inline

◆ dimensions()

template<class Type >
std::size_t Tuple4Tpl< Type >::dimensions ( ) const
inline

◆ fromArray() [1/3]

template<class Type >
static Tuple4Tpl Tuple4Tpl< Type >::fromArray ( const Eigen::Matrix< Type, 4, 1 > &  a)
inlinestatic

Constructor from a Eigen vector.

◆ fromArray() [2/3]

template<class Type >
static Eigen::Matrix<Type, 4, 1> Tuple4Tpl< Type >::fromArray ( const Tuple4Tpl< double > &  a)
inlinestatic

◆ fromArray() [3/3]

template<class Type >
static Eigen::Matrix<Type, 4, 1> Tuple4Tpl< Type >::fromArray ( const Tuple4Tpl< float > &  a)
inlinestatic

◆ operator()() [1/2]

template<class Type >
Type& Tuple4Tpl< Type >::operator() ( unsigned  i)
inline

Direct coordinate access.

◆ operator()() [2/2]

template<class Type >
const Type& Tuple4Tpl< Type >::operator() ( unsigned  i) const
inline

Direct coordinate access (const)

◆ operator*()

template<class Type >
Tuple4Tpl Tuple4Tpl< Type >::operator* ( Type  s) const
inline

Multiplication operator.

◆ operator*=()

template<class Type >
Tuple4Tpl& Tuple4Tpl< Type >::operator*= ( Type  v)
inline

In-place multiplication (by a scalar) operator.

◆ operator+()

template<class Type >
Tuple4Tpl Tuple4Tpl< Type >::operator+ ( const Tuple4Tpl< Type > &  v) const
inline

Addition operator.

◆ operator+=()

template<class Type >
Tuple4Tpl& Tuple4Tpl< Type >::operator+= ( const Tuple4Tpl< Type > &  v)
inline

In-place addition operator.

◆ operator-() [1/2]

template<class Type >
Tuple4Tpl Tuple4Tpl< Type >::operator- ( ) const
inline

Inverse operator.

◆ operator-() [2/2]

template<class Type >
Tuple4Tpl Tuple4Tpl< Type >::operator- ( const Tuple4Tpl< Type > &  v) const
inline

Subtraction operator.

◆ operator-=()

template<class Type >
Tuple4Tpl& Tuple4Tpl< Type >::operator-= ( const Tuple4Tpl< Type > &  v)
inline

In-place subtraction operator.

◆ operator/()

template<class Type >
Tuple4Tpl Tuple4Tpl< Type >::operator/ ( Type  s) const
inline

Division operator.

◆ operator/=()

template<class Type >
Tuple4Tpl& Tuple4Tpl< Type >::operator/= ( Type  v)
inline

In-place division (by a scalar) operator.

◆ operator=() [1/2]

template<class Type >
Tuple4Tpl& Tuple4Tpl< Type >::operator= ( const Eigen::Matrix< double, 4, 1 > &  v)
inline

◆ operator=() [2/2]

template<class Type >
Tuple4Tpl& Tuple4Tpl< Type >::operator= ( const Eigen::Matrix< float, 4, 1 > &  v)
inline

Assignment Function.

◆ operator[]() [1/2]

template<class Type >
Type& Tuple4Tpl< Type >::operator[] ( unsigned  i)
inline

Direct coordinate access.

◆ operator[]() [2/2]

template<class Type >
const Type& Tuple4Tpl< Type >::operator[] ( unsigned  i) const
inline

Direct coordinate access (const)

◆ rows()

template<class Type >
std::size_t Tuple4Tpl< Type >::rows ( ) const
inline

Member Data Documentation

◆ @9

union { ... }

◆ u

◆ w

◆ x

◆ y

◆ z


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