OpenVDB  10.0.1
Public Types | Public Member Functions | Static Public Attributes | List of all members
Vec4< T > Class Template Reference

A simple vector class with three double components, similar to openvdb::math::Vec4. More...

#include <nanovdb/NanoVDB.h>

Public Types

using ValueType = T
 

Public Member Functions

 Vec4 ()=default
 
 Vec4 (T x)
 
 Vec4 (T x, T y, T z, T w)
 
template<typename T2 >
 Vec4 (const Vec4< T2 > &v)
 
bool operator== (const Vec4 &rhs) const
 
bool operator!= (const Vec4 &rhs) const
 
template<typename Vec4T >
Vec4operator= (const Vec4T &rhs)
 
const T & operator[] (int i) const
 
T & operator[] (int i)
 
template<typename Vec4T >
dot (const Vec4T &v) const
 
lengthSqr () const
 
length () const
 
Vec4 operator- () const
 
Vec4 operator* (const Vec4 &v) const
 
Vec4 operator/ (const Vec4 &v) const
 
Vec4 operator+ (const Vec4 &v) const
 
Vec4 operator- (const Vec4 &v) const
 
Vec4 operator* (const T &s) const
 
Vec4 operator/ (const T &s) const
 
Vec4operator+= (const Vec4 &v)
 
Vec4operator-= (const Vec4 &v)
 
Vec4operator*= (const T &s)
 
Vec4operator/= (const T &s)
 
Vec4normalize ()
 
Vec4minComponent (const Vec4 &other)
 Perform a component-wise minimum with the other Coord. More...
 
Vec4maxComponent (const Vec4 &other)
 Perform a component-wise maximum with the other Coord. More...
 

Static Public Attributes

static const int SIZE = 4
 

Detailed Description

template<typename T>
class nanovdb::Vec4< T >

A simple vector class with three double components, similar to openvdb::math::Vec4.

Member Typedef Documentation

using ValueType = T

Constructor & Destructor Documentation

Vec4 ( )
default
Vec4 ( x)
inlineexplicit
Vec4 ( x,
y,
z,
w 
)
inline
Vec4 ( const Vec4< T2 > &  v)
inlineexplicit

Member Function Documentation

T dot ( const Vec4T &  v) const
inline
T length ( ) const
inline
T lengthSqr ( ) const
inline
Vec4& maxComponent ( const Vec4< T > &  other)
inline

Perform a component-wise maximum with the other Coord.

Vec4& minComponent ( const Vec4< T > &  other)
inline

Perform a component-wise minimum with the other Coord.

Vec4& normalize ( )
inline
bool operator!= ( const Vec4< T > &  rhs) const
inline
Vec4 operator* ( const Vec4< T > &  v) const
inline
Vec4 operator* ( const T &  s) const
inline
Vec4& operator*= ( const T &  s)
inline
Vec4 operator+ ( const Vec4< T > &  v) const
inline
Vec4& operator+= ( const Vec4< T > &  v)
inline
Vec4 operator- ( ) const
inline
Vec4 operator- ( const Vec4< T > &  v) const
inline
Vec4& operator-= ( const Vec4< T > &  v)
inline
Vec4 operator/ ( const Vec4< T > &  v) const
inline
Vec4 operator/ ( const T &  s) const
inline
Vec4& operator/= ( const T &  s)
inline
Vec4& operator= ( const Vec4T &  rhs)
inline
bool operator== ( const Vec4< T > &  rhs) const
inline
const T& operator[] ( int  i) const
inline
T& operator[] ( int  i)
inline

Member Data Documentation

const int SIZE = 4
static