VTK
Macros | Functions
vtkVectorOperators.h File Reference
#include "vtkVector.h"
Include dependency graph for vtkVectorOperators.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define vtkVectorOperatorNegate(vectorType, type, size)
 
#define vtkVectorOperatorPlus(vectorType, type, size)
 
#define vtkVectorOperatorMinus(vectorType, type, size)
 
#define vtkVectorOperatorMultiply(vectorType, type, size)
 
#define vtkVectorOperatorMultiplyScalar(vectorType, type, size)
 
#define vtkVectorOperatorMultiplyScalarPre(vectorType, type, size)
 
#define vtkVectorOperatorDivide(vectorType, type, size)
 
#define vtkVectorOperatorMacro(vectorType, type, size)
 

Functions

template<typename A , int Size>
vtkVector< A, Size > operator- (const vtkVector< A, Size > &v)
 
template<typename A , int Size>
vtkVector< A, Size > operator+ (const vtkVector< A, Size > &v1, const vtkVector< A, Size > &v2)
 
template<typename A , int Size>
vtkVector< A, Size > operator- (const vtkVector< A, Size > &v1, const vtkVector< A, Size > &v2)
 
template<typename A , int Size>
vtkVector< A, Size > operator* (const vtkVector< A, Size > &v1, const vtkVector< A, Size > &v2)
 
template<typename A , typename B , int Size>
vtkVector< A, Size > operator* (const vtkVector< A, Size > &v1, const B &scalar)
 
template<typename A , int Size>
vtkVector< A, Size > operator/ (const vtkVector< A, Size > &v1, const vtkVector< A, Size > &v2)
 
 vtkVectorOperatorMacro (vtkVector2i, int, 2)
 
 vtkVectorOperatorMacro (vtkVector2f, float, 2)
 
 vtkVectorOperatorMacro (vtkVector2d, double, 2)
 
 vtkVectorOperatorMacro (vtkVector3i, int, 3)
 
 vtkVectorOperatorMacro (vtkVector3f, float, 3)
 
 vtkVectorOperatorMacro (vtkVector3d, double, 3)
 

Macro Definition Documentation

◆ vtkVectorOperatorNegate

#define vtkVectorOperatorNegate (   vectorType,
  type,
  size 
)
Value:
inline vectorType operator-(const vectorType& v) \
{ \
return vectorType((-static_cast<vtkVector<type, size> >(v)).GetData()); \
}

Definition at line 103 of file vtkVectorOperators.h.

◆ vtkVectorOperatorPlus

#define vtkVectorOperatorPlus (   vectorType,
  type,
  size 
)
Value:
inline vectorType operator+(const vectorType& v1, const vectorType& v2) \
{ \
return vectorType( \
(static_cast<vtkVector<type, size> >(v1) + static_cast<vtkVector<type, size> >(v2)) \
.GetData()); \
}

Definition at line 108 of file vtkVectorOperators.h.

◆ vtkVectorOperatorMinus

#define vtkVectorOperatorMinus (   vectorType,
  type,
  size 
)
Value:
inline vectorType operator-(const vectorType& v1, const vectorType& v2) \
{ \
return vectorType( \
(static_cast<vtkVector<type, size> >(v1) - static_cast<vtkVector<type, size> >(v2)) \
.GetData()); \
}

Definition at line 115 of file vtkVectorOperators.h.

◆ vtkVectorOperatorMultiply

#define vtkVectorOperatorMultiply (   vectorType,
  type,
  size 
)
Value:
inline vectorType operator*(const vectorType& v1, const vectorType& v2) \
{ \
return vectorType( \
(static_cast<vtkVector<type, size> >(v1) * static_cast<vtkVector<type, size> >(v2)) \
.GetData()); \
}

Definition at line 122 of file vtkVectorOperators.h.

◆ vtkVectorOperatorMultiplyScalar

#define vtkVectorOperatorMultiplyScalar (   vectorType,
  type,
  size 
)
Value:
template <typename B> \
inline vectorType operator*(const vectorType& v1, const B& scalar) \
{ \
return vectorType((static_cast<vtkVector<type, size> >(v1) * scalar).GetData()); \
}

Definition at line 129 of file vtkVectorOperators.h.

◆ vtkVectorOperatorMultiplyScalarPre

#define vtkVectorOperatorMultiplyScalarPre (   vectorType,
  type,
  size 
)
Value:
template <typename B> \
inline vectorType operator*(const B& scalar, const vectorType& v1) \
{ \
return vectorType((static_cast<vtkVector<type, size> >(v1) * scalar).GetData()); \
}

Definition at line 135 of file vtkVectorOperators.h.

◆ vtkVectorOperatorDivide

#define vtkVectorOperatorDivide (   vectorType,
  type,
  size 
)
Value:
inline vectorType operator/(const vectorType& v1, const vectorType& v2) \
{ \
return vectorType( \
(static_cast<vtkVector<type, size> >(v1) / static_cast<vtkVector<type, size> >(v2)) \
.GetData()); \
}

Definition at line 141 of file vtkVectorOperators.h.

◆ vtkVectorOperatorMacro

#define vtkVectorOperatorMacro (   vectorType,
  type,
  size 
)
Value:
vtkVectorOperatorPlus(vectorType, type, size); \
vtkVectorOperatorMinus(vectorType, type, size); \
vtkVectorOperatorMultiply(vectorType, type, size); \
vtkVectorOperatorMultiplyScalar(vectorType, type, size); \
vtkVectorOperatorMultiplyScalarPre(vectorType, type, size); \
vtkVectorOperatorDivide(vectorType, type, size)

Definition at line 149 of file vtkVectorOperators.h.

Function Documentation

◆ operator-() [1/2]

template<typename A , int Size>
vtkVector<A, Size> operator- ( const vtkVector< A, Size > &  v)

Definition at line 26 of file vtkVectorOperators.h.

◆ operator+()

template<typename A , int Size>
vtkVector<A, Size> operator+ ( const vtkVector< A, Size > &  v1,
const vtkVector< A, Size > &  v2 
)

Definition at line 39 of file vtkVectorOperators.h.

◆ operator-() [2/2]

template<typename A , int Size>
vtkVector<A, Size> operator- ( const vtkVector< A, Size > &  v1,
const vtkVector< A, Size > &  v2 
)

Definition at line 52 of file vtkVectorOperators.h.

◆ operator*() [1/2]

template<typename A , int Size>
vtkVector<A, Size> operator* ( const vtkVector< A, Size > &  v1,
const vtkVector< A, Size > &  v2 
)

Definition at line 65 of file vtkVectorOperators.h.

◆ operator*() [2/2]

template<typename A , typename B , int Size>
vtkVector<A, Size> operator* ( const vtkVector< A, Size > &  v1,
const B &  scalar 
)

Definition at line 78 of file vtkVectorOperators.h.

◆ operator/()

template<typename A , int Size>
vtkVector<A, Size> operator/ ( const vtkVector< A, Size > &  v1,
const vtkVector< A, Size > &  v2 
)

Definition at line 91 of file vtkVectorOperators.h.

◆ vtkVectorOperatorMacro() [1/6]

vtkVectorOperatorMacro ( vtkVector2i  ,
int  ,
 
)

◆ vtkVectorOperatorMacro() [2/6]

vtkVectorOperatorMacro ( vtkVector2f  ,
float  ,
 
)

◆ vtkVectorOperatorMacro() [3/6]

vtkVectorOperatorMacro ( vtkVector2d  ,
double  ,
 
)

◆ vtkVectorOperatorMacro() [4/6]

vtkVectorOperatorMacro ( vtkVector3i  ,
int  ,
 
)

◆ vtkVectorOperatorMacro() [5/6]

vtkVectorOperatorMacro ( vtkVector3f  ,
float  ,
 
)

◆ vtkVectorOperatorMacro() [6/6]

vtkVectorOperatorMacro ( vtkVector3d  ,
double  ,
 
)
vtkX3D::type
Definition: vtkX3D.h:522
vtkVector
templated base type for storage of vectors.
Definition: vtkVector.h:37
operator*
vtkVector< A, Size > operator*(const vtkVector< A, Size > &v1, const vtkVector< A, Size > &v2)
Definition: vtkVectorOperators.h:65
operator/
vtkVector< A, Size > operator/(const vtkVector< A, Size > &v1, const vtkVector< A, Size > &v2)
Definition: vtkVectorOperators.h:91
vtkX3D::size
Definition: vtkX3D.h:259
vtkVectorOperatorNegate
#define vtkVectorOperatorNegate(vectorType, type, size)
Definition: vtkVectorOperators.h:103
operator-
vtkVector< A, Size > operator-(const vtkVector< A, Size > &v)
Definition: vtkVectorOperators.h:26
operator+
vtkVector< A, Size > operator+(const vtkVector< A, Size > &v1, const vtkVector< A, Size > &v2)
Definition: vtkVectorOperators.h:39