VTK  9.1.0
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 T , int Size>
vtkVector< T, Size > operator+= (vtkVector< T, Size > &a, const vtkVector< T, Size > &b)
 
template<typename A , int Size>
vtkVector< A, Size > operator- (const vtkVector< A, Size > &v1, const vtkVector< A, Size > &v2)
 
template<typename T , int Size>
vtkVector< T, Size > operator-= (vtkVector< T, Size > &a, const vtkVector< T, Size > &b)
 
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()); \
}
templated base type for storage of vectors.
Definition: vtkVector.h:97
vtkVector< A, Size > operator-(const vtkVector< A, Size > &v)

Definition at line 131 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()); \
}
vtkVector< A, Size > operator+(const vtkVector< A, Size > &v1, const vtkVector< A, Size > &v2)

Definition at line 136 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 143 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()); \
}
vtkVector< A, Size > operator*(const vtkVector< A, Size > &v1, const vtkVector< A, Size > &v2)

Definition at line 150 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 157 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 163 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()); \
}
vtkVector< A, Size > operator/(const vtkVector< A, Size > &v1, const vtkVector< A, Size > &v2)

Definition at line 169 of file vtkVectorOperators.h.

◆ vtkVectorOperatorMacro

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

Definition at line 177 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+=()

template<typename T , int Size>
vtkVector< T, Size > operator+= ( vtkVector< T, Size > &  a,
const vtkVector< T, Size > &  b 
)

Definition at line 52 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 66 of file vtkVectorOperators.h.

◆ operator-=()

template<typename T , int Size>
vtkVector< T, Size > operator-= ( vtkVector< T, Size > &  a,
const vtkVector< T, Size > &  b 
)

Definition at line 79 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 93 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 106 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 119 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  ,
 
)