OpenVDB 13.1.0
Loading...
Searching...
No Matches
Mat3< T > Class Template Reference

#include <nanovdb/math/Math.h>

Public Member Functions

 Mat3 ()=default
template<typename Source>
__hostdev__ Mat3 (Source a, Source b, Source c, Source d, Source e, Source f, Source g, Source h, Source i)
 Constructor given individual array elements, the ordering is in row major form:
template<typename Source>
__hostdev__ Mat3 (Source *a)
 Constructor given array of elements, the ordering is in row major form.
__hostdev__ Mat3< T > operator+ (const Mat3< T > &m) const
 Add two matrices and return the resulting matrix.
__hostdev__ Vec3< T > operator* (const Vec3< T > &v) const
 Multiply by v and return the resulting vector.
__hostdev__ Mat3< T > operator* (const Mat3< T > &m) const
 Multiply by 3x3 matrix m and return the resulting matrix.
__hostdev__ Mat3< T > & operator+= (const Mat3< T > &m)
 Add each element of the given matrix to the corresponding element of this matrix.
__hostdev__ Mat3 transpose () const
 returns transpose of this
__hostdev__ T * operator[] (int row)
__hostdev__ const T * operator[] (int row) const

Static Protected Member Functions

static constexpr int rows ()
static constexpr int cols ()
static constexpr int size ()

Protected Attributes

mData [ROWS *COLS]

Constructor & Destructor Documentation

◆ Mat3() [1/3]

template<typename T>
Mat3 ( )
default

◆ Mat3() [2/3]

template<typename T>
template<typename Source>
__hostdev__ Mat3 ( Source a,
Source b,
Source c,
Source d,
Source e,
Source f,
Source g,
Source h,
Source i )
inline

Constructor given individual array elements, the ordering is in row major form:

a b c
d e f
g h i

◆ Mat3() [3/3]

template<typename T>
template<typename Source>
__hostdev__ Mat3 ( Source * a)
inline

Constructor given array of elements, the ordering is in row major form.

Member Function Documentation

◆ cols()

constexpr int cols ( )
inlinestaticconstexprprotectedinherited

◆ operator*() [1/2]

template<typename T>
__hostdev__ Mat3< T > operator* ( const Mat3< T > & m) const
inline

Multiply by 3x3 matrix m and return the resulting matrix.

◆ operator*() [2/2]

template<typename T>
__hostdev__ Vec3< T > operator* ( const Vec3< T > & v) const
inline

Multiply by v and return the resulting vector.

◆ operator+()

template<typename T>
__hostdev__ Mat3< T > operator+ ( const Mat3< T > & m) const
inline

Add two matrices and return the resulting matrix.

◆ operator+=()

template<typename T>
__hostdev__ Mat3< T > & operator+= ( const Mat3< T > & m)
inline

Add each element of the given matrix to the corresponding element of this matrix.

◆ operator[]() [1/2]

__hostdev__ T * operator[] ( int row)
inlineinherited

◆ operator[]() [2/2]

__hostdev__ const T * operator[] ( int row) const
inlineinherited

◆ rows()

constexpr int rows ( )
inlinestaticconstexprprotectedinherited

◆ size()

constexpr int size ( )
inlinestaticconstexprprotectedinherited

◆ transpose()

template<typename T>
__hostdev__ Mat3 transpose ( ) const
inline

returns transpose of this

Member Data Documentation

◆ mData

T mData[ROWS *COLS]
protectedinherited