OpenVDB 9.0.0
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

◆ ValueType

using ValueType = T

Constructor & Destructor Documentation

◆ Vec4() [1/4]

Vec4 ( )
default

◆ Vec4() [2/4]

Vec4 ( x)
inlineexplicit

◆ Vec4() [3/4]

Vec4 ( x,
y,
z,
w 
)
inline

◆ Vec4() [4/4]

Vec4 ( const Vec4< T2 > &  v)
inlineexplicit

Member Function Documentation

◆ dot()

T dot ( const Vec4T &  v) const
inline

◆ length()

T length ( ) const
inline

◆ lengthSqr()

T lengthSqr ( ) const
inline

◆ maxComponent()

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

Perform a component-wise maximum with the other Coord.

◆ minComponent()

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

Perform a component-wise minimum with the other Coord.

◆ normalize()

Vec4 & normalize ( )
inline

◆ operator!=()

bool operator!= ( const Vec4< T > &  rhs) const
inline

◆ operator*() [1/2]

Vec4 operator* ( const T &  s) const
inline

◆ operator*() [2/2]

Vec4 operator* ( const Vec4< T > &  v) const
inline

◆ operator*=()

Vec4 & operator*= ( const T &  s)
inline

◆ operator+()

Vec4 operator+ ( const Vec4< T > &  v) const
inline

◆ operator+=()

Vec4 & operator+= ( const Vec4< T > &  v)
inline

◆ operator-() [1/2]

Vec4 operator- ( ) const
inline

◆ operator-() [2/2]

Vec4 operator- ( const Vec4< T > &  v) const
inline

◆ operator-=()

Vec4 & operator-= ( const Vec4< T > &  v)
inline

◆ operator/() [1/2]

Vec4 operator/ ( const T &  s) const
inline

◆ operator/() [2/2]

Vec4 operator/ ( const Vec4< T > &  v) const
inline

◆ operator/=()

Vec4 & operator/= ( const T &  s)
inline

◆ operator=()

Vec4 & operator= ( const Vec4T &  rhs)
inline

◆ operator==()

bool operator== ( const Vec4< T > &  rhs) const
inline

◆ operator[]() [1/2]

T & operator[] ( int  i)
inline

◆ operator[]() [2/2]

const T & operator[] ( int  i) const
inline

Member Data Documentation

◆ SIZE

const int SIZE = 4
static