MbVec3< _T > Class Template Reference
[MeshViz XLM]

MeshViz Class defining a vector or a point of 3 coordinates. More...

#include <MeshVizXLM/MbVec3.h>

List of all members.

Public Types

typedef _T ValueType

Public Member Functions

 MbVec3 ()
 MbVec3 (const _T v[3])
 MbVec3 (_T x, _T y, _T z)
template<typename _Type >
 MbVec3 (_Type x, _Type y, _Type z)
 MbVec3 (char v)
 MbVec3 (unsigned char v)
 MbVec3 (short v)
 MbVec3 (unsigned short v)
 MbVec3 (int v)
 MbVec3 (size_t v)
 MbVec3 (long v)
 MbVec3 (float v)
 MbVec3 (double v)
 MbVec3 (long double v)
template<typename _MbVec3T >
 MbVec3 (const _MbVec3T &v)
MbVec3 cross (const MbVec3< _T > &v) const
_T dot (const MbVec3< _T > &v) const
const _T * getValue () const
void getValue (_T &x, _T &y, _T &z) const
_T length () const
_T normalize ()
void negate ()
MbVec3 mult (const MbVec3< _T > &v) const
MbVec3 div (const MbVec3< _T > &v) const
MbVec3< _T > & setValue (const _T v[3])
MbVec3< _T > & setValue (_T x, _T y, _T z)
MbVec3operator= (_T d)
MbVec3operator*= (_T d)
MbVec3operator/= (_T d)
MbVec3operator+= (const MbVec3 &v)
MbVec3operator-= (const MbVec3 &v)
MbVec3 operator- () const
bool equals (const MbVec3 &v, _T tolerance) const
bool equals (const MbVec3 &v) const

Static Public Member Functions

static MbVec3 numeric_limit_max ()

Friends

MbVec3 operator* (const MbVec3 &v1, const MbVec3 &v2)
MbVec3 operator* (const MbVec3 &v, _T d)
MbVec3 operator* (_T d, const MbVec3 &v)
MbVec3 operator/ (const MbVec3 &v, _T d)
MbVec3 operator/ (const MbVec3 &v1, const MbVec3 &v2)
MbVec3 operator+ (const MbVec3 &v1, const MbVec3 &v2)
MbVec3 operator+ (const MbVec3 &v, _T d)
MbVec3 operator+ (_T d, const MbVec3 &v)
MbVec3 operator- (const MbVec3 &v1, const MbVec3 &v2)
MbVec3 operator- (const MbVec3 &v, _T d)
MbVec3 sqrt (const MbVec3 &v)
bool operator== (const MbVec3 &v1, const MbVec3 &v2)
bool operator!= (const MbVec3 &v1, const MbVec3 &v2)
bool operator< (const MbVec3 &v1, const MbVec3 &v2)
bool operator<= (const MbVec3 &v1, const MbVec3 &v2)
bool operator> (const MbVec3 &v1, const MbVec3 &v2)
bool operator>= (const MbVec3 &v1, const MbVec3 &v2)
bool areCollinear (const MbVec3< _T > &v1, const MbVec3< _T > &v2, _T tol)
bool areCollinear (const MbVec3< _T > &v1, const MbVec3< _T > &v2)
std::ostream & operator<< (std::ostream &os, const MbVec3 &v)



_T & operator[] (int i)
const _T & operator[] (int i) const
_T & operator[] (size_t i)
const _T & operator[] (size_t i) const

Detailed Description

template<typename _T>
class MbVec3< _T >

MeshViz Class defining a vector or a point of 3 coordinates.

3D vector class used to store 3D vectors and points. This class is similar to the standard Open Inventor SbVec3 classes, but exists to allow MeshViz Extraction to be used independently of Open Inventor.


Member Typedef Documentation

template<typename _T>
typedef _T MbVec3< _T >::ValueType

Constructor & Destructor Documentation

template<typename _T>
MbVec3< _T >::MbVec3 (  )  [inline]

Constructor (vector is initialized to zero values).

template<typename _T>
MbVec3< _T >::MbVec3 ( const _T  v[3]  )  [inline]

Constructor.

template<typename _T>
MbVec3< _T >::MbVec3 ( _T  x,
_T  y,
_T  z 
) [inline]

Constructor.

template<typename _T>
template<typename _Type >
MbVec3< _T >::MbVec3 ( _Type  x,
_Type  y,
_Type  z 
) [inline]
template<typename _T>
MbVec3< _T >::MbVec3 ( char  v  )  [inline, explicit]

Constructor.

template<typename _T>
MbVec3< _T >::MbVec3 ( unsigned char  v  )  [inline, explicit]

Constructor.

template<typename _T>
MbVec3< _T >::MbVec3 ( short  v  )  [inline, explicit]

Constructor.

template<typename _T>
MbVec3< _T >::MbVec3 ( unsigned short  v  )  [inline, explicit]

Constructor.

template<typename _T>
MbVec3< _T >::MbVec3 ( int  v  )  [inline, explicit]

Constructor.

template<typename _T>
MbVec3< _T >::MbVec3 ( size_t  v  )  [inline, explicit]

Constructor.

template<typename _T>
MbVec3< _T >::MbVec3 ( long  v  )  [inline, explicit]

Constructor.

template<typename _T>
MbVec3< _T >::MbVec3 ( float  v  )  [inline, explicit]

Constructor.

template<typename _T>
MbVec3< _T >::MbVec3 ( double  v  )  [inline, explicit]

Constructor.

template<typename _T>
MbVec3< _T >::MbVec3 ( long double  v  )  [inline, explicit]

Constructor.

template<typename _T>
template<typename _MbVec3T >
MbVec3< _T >::MbVec3 ( const _MbVec3T &  v  )  [inline, explicit]

Constructor.


Member Function Documentation

template<typename _T>
MbVec3 MbVec3< _T >::cross ( const MbVec3< _T > &  v  )  const [inline]

Returns right-handed cross product of vector and another vector.

template<typename _T>
MbVec3 MbVec3< _T >::div ( const MbVec3< _T > &  v  )  const [inline]

Component-wise vector division.

template<typename _T>
_T MbVec3< _T >::dot ( const MbVec3< _T > &  v  )  const [inline]

Returns dot (inner) product of vector and another vector.

template<typename _T>
bool MbVec3< _T >::equals ( const MbVec3< _T > &  v  )  const [inline]

Equality comparison within the machine epsilon given by the numeric_limits<_T> Square of the length of the maximum distance between the two vectors.

template<typename _T>
bool MbVec3< _T >::equals ( const MbVec3< _T > &  v,
_T  tolerance 
) const [inline]

Equality comparison within given tolerance - the square of the length of the maximum distance between the two vectors.

template<typename _T>
void MbVec3< _T >::getValue ( _T &  x,
_T &  y,
_T &  z 
) const [inline]

Returns vector components.

template<typename _T>
const _T* MbVec3< _T >::getValue (  )  const [inline]

Returns pointer to vector components.

template<typename _T>
_T MbVec3< _T >::length (  )  const [inline]

Returns geometric length of vector.

template<typename _T>
MbVec3 MbVec3< _T >::mult ( const MbVec3< _T > &  v  )  const [inline]

Component-wise vector multiplication.

template<typename _T>
void MbVec3< _T >::negate (  )  [inline]

Negates each component of vector in place.

template<typename _T >
_T MbVec3< _T >::normalize (  )  [inline]

Changes vector to be unit length, returning the length before normalization.

template<typename _T>
static MbVec3 MbVec3< _T >::numeric_limit_max (  )  [inline, static]

Returns the maximum value for a vector.

template<typename _T>
MbVec3& MbVec3< _T >::operator*= ( _T  d  )  [inline]

Component-wise scalar multiplication operator.

template<typename _T>
MbVec3& MbVec3< _T >::operator+= ( const MbVec3< _T > &  v  )  [inline]

Component-wise vector addition operator.

template<typename _T>
MbVec3 MbVec3< _T >::operator- (  )  const [inline]

Nondestructive unary negation - returns a new vector.

template<typename _T>
MbVec3& MbVec3< _T >::operator-= ( const MbVec3< _T > &  v  )  [inline]

Component-wise vector subtraction operator.

template<typename _T>
MbVec3& MbVec3< _T >::operator/= ( _T  d  )  [inline]

Component-wise scalar division operator.

template<typename _T>
MbVec3& MbVec3< _T >::operator= ( _T  d  )  [inline]

Component-wise setting.

All components are set to d.

template<typename _T>
const _T& MbVec3< _T >::operator[] ( size_t  i  )  const [inline]

Accesses indexed component of vector.

template<typename _T>
_T& MbVec3< _T >::operator[] ( size_t  i  )  [inline]

Accesses indexed component of vector.

template<typename _T>
const _T& MbVec3< _T >::operator[] ( int  i  )  const [inline]

Accesses indexed component of vector.

template<typename _T>
_T& MbVec3< _T >::operator[] ( int  i  )  [inline]

Accesses indexed component of vector.

template<typename _T>
MbVec3<_T>& MbVec3< _T >::setValue ( _T  x,
_T  y,
_T  z 
) [inline]

Sets the vector components.

template<typename _T>
MbVec3<_T>& MbVec3< _T >::setValue ( const _T  v[3]  )  [inline]

Sets the vector components.


Friends And Related Function Documentation

template<typename _T>
bool areCollinear ( const MbVec3< _T > &  v1,
const MbVec3< _T > &  v2 
) [friend]

Returns true if vectors are collinear within the machine epsilon given by the numeric_limits<_T>.

template<typename _T>
bool areCollinear ( const MbVec3< _T > &  v1,
const MbVec3< _T > &  v2,
_T  tol 
) [friend]

Returns true if vectors are collinear within the given tolerance.

template<typename _T>
bool operator!= ( const MbVec3< _T > &  v1,
const MbVec3< _T > &  v2 
) [friend]

Inequality comparison operator.

template<typename _T>
MbVec3 operator* ( _T  d,
const MbVec3< _T > &  v 
) [friend]

Component-wise binary scalar multiplication operator.

template<typename _T>
MbVec3 operator* ( const MbVec3< _T > &  v,
_T  d 
) [friend]

Component-wise binary scalar multiplication operator.

template<typename _T>
MbVec3 operator* ( const MbVec3< _T > &  v1,
const MbVec3< _T > &  v2 
) [friend]

Component-wise vector multiplication operator.

template<typename _T>
MbVec3 operator+ ( _T  d,
const MbVec3< _T > &  v 
) [friend]

Component-wise binary scalar addition operator.

template<typename _T>
MbVec3 operator+ ( const MbVec3< _T > &  v,
_T  d 
) [friend]

Component-wise binary scalar addition operator.

template<typename _T>
MbVec3 operator+ ( const MbVec3< _T > &  v1,
const MbVec3< _T > &  v2 
) [friend]

Component-wise binary vector addition operator.

template<typename _T>
MbVec3 operator- ( const MbVec3< _T > &  v,
_T  d 
) [friend]

Component-wise binary scalar subtraction operator.

template<typename _T>
MbVec3 operator- ( const MbVec3< _T > &  v1,
const MbVec3< _T > &  v2 
) [friend]

Component-wise binary vector subtraction operator.

template<typename _T>
MbVec3 operator/ ( const MbVec3< _T > &  v1,
const MbVec3< _T > &  v2 
) [friend]

Component-wise vector division operator.

template<typename _T>
MbVec3 operator/ ( const MbVec3< _T > &  v,
_T  d 
) [friend]

Component-wise binary scalar division operator.

template<typename _T>
bool operator< ( const MbVec3< _T > &  v1,
const MbVec3< _T > &  v2 
) [friend]

Length comparison operator.

template<typename _T>
std::ostream& operator<< ( std::ostream &  os,
const MbVec3< _T > &  v 
) [friend]

Writes the vector to the specified output stream.

template<typename _T>
bool operator<= ( const MbVec3< _T > &  v1,
const MbVec3< _T > &  v2 
) [friend]

Length comparison operator.

template<typename _T>
bool operator== ( const MbVec3< _T > &  v1,
const MbVec3< _T > &  v2 
) [friend]

Equality comparison operator.

template<typename _T>
bool operator> ( const MbVec3< _T > &  v1,
const MbVec3< _T > &  v2 
) [friend]

Length comparison operator.

template<typename _T>
bool operator>= ( const MbVec3< _T > &  v1,
const MbVec3< _T > &  v2 
) [friend]

Length comparison operator.

template<typename _T>
MbVec3 sqrt ( const MbVec3< _T > &  v  )  [friend]

Component-wise vector square root operator.


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

Open Inventor Toolkit reference manual, generated on 28 Jan 2020
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/