VTK
Macros | Functions | Variables
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
 
 vtkVectorOperatorMacro (vtkVector2d, double, 2) vtkVectorOperatorMacro(vtkVector3i
 
 vtkVectorOperatorMacro (vtkVector3f, float, 3) vtkVectorOperatorMacro(vtkVector3d
 

Variables

 float
 
 int
 
 double
 

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 108 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 113 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 119 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 125 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 131 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 137 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 143 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 150 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 53 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 67 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 81 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 95 of file vtkVectorOperators.h.

◆ vtkVectorOperatorMacro() [1/3]

vtkVectorOperatorMacro ( vtkVector2i  ,
int  ,
 
)

◆ vtkVectorOperatorMacro() [2/3]

vtkVectorOperatorMacro ( vtkVector2d  ,
double  ,
 
)

◆ vtkVectorOperatorMacro() [3/3]

vtkVectorOperatorMacro ( vtkVector3f  ,
float  ,
 
)

Variable Documentation

◆ float

float

Definition at line 162 of file vtkVectorOperators.h.

◆ int

int

Definition at line 164 of file vtkVectorOperators.h.

◆ double

double

Definition at line 166 of file vtkVectorOperators.h.

vtkX3D::type
Definition: vtkX3D.h:516
vtkVector
templated base type for storage of vectors.
Definition: vtkVector.h:40
operator*
vtkVector< A, Size > operator*(const vtkVector< A, Size > &v1, const vtkVector< A, Size > &v2)
Definition: vtkVectorOperators.h:67
operator/
vtkVector< A, Size > operator/(const vtkVector< A, Size > &v1, const vtkVector< A, Size > &v2)
Definition: vtkVectorOperators.h:95
vtkX3D::size
Definition: vtkX3D.h:253
vtkVectorOperatorNegate
#define vtkVectorOperatorNegate(vectorType, type, size)
Definition: vtkVectorOperators.h:108
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