HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nanovdb::Vec3< typename > Class Template Reference

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

#include <NanoVDB.h>

Public Types

using ValueType = T
 

Public Member Functions

 Vec3 ()=default
 
__hostdev__ Vec3 (T x)
 
__hostdev__ Vec3 (T x, T y, T z)
 
template<template< class > class Vec3T, class T2 >
__hostdev__ Vec3 (const Vec3T< T2 > &v)
 
template<typename T2 >
__hostdev__ Vec3 (const Vec3< T2 > &v)
 
__hostdev__ Vec3 (const Coord &ijk)
 
__hostdev__ bool operator== (const Vec3 &rhs) const
 
__hostdev__ bool operator!= (const Vec3 &rhs) const
 
template<template< class > class Vec3T, class T2 >
__hostdev__ Vec3operator= (const Vec3T< T2 > &rhs)
 
__hostdev__ const T & operator[] (int i) const
 
__hostdev__ T & operator[] (int i)
 
template<typename Vec3T >
__hostdev__dot (const Vec3T &v) const
 
template<typename Vec3T >
__hostdev__ Vec3 cross (const Vec3T &v) const
 
__hostdev__lengthSqr () const
 
__hostdev__length () const
 
__hostdev__ Vec3 operator- () const
 
__hostdev__ Vec3 operator* (const Vec3 &v) const
 
__hostdev__ Vec3 operator/ (const Vec3 &v) const
 
__hostdev__ Vec3 operator+ (const Vec3 &v) const
 
__hostdev__ Vec3 operator- (const Vec3 &v) const
 
__hostdev__ Vec3 operator+ (const Coord &ijk) const
 
__hostdev__ Vec3 operator- (const Coord &ijk) const
 
__hostdev__ Vec3 operator* (const T &s) const
 
__hostdev__ Vec3 operator/ (const T &s) const
 
__hostdev__ Vec3operator+= (const Vec3 &v)
 
__hostdev__ Vec3operator+= (const Coord &ijk)
 
__hostdev__ Vec3operator-= (const Vec3 &v)
 
__hostdev__ Vec3operator-= (const Coord &ijk)
 
__hostdev__ Vec3operator*= (const T &s)
 
__hostdev__ Vec3operator/= (const T &s)
 
__hostdev__ Vec3normalize ()
 
__hostdev__ Vec3minComponent (const Vec3 &other)
 Perform a component-wise minimum with the other Coord. More...
 
__hostdev__ Vec3maxComponent (const Vec3 &other)
 Perform a component-wise maximum with the other Coord. More...
 
__hostdev__ ValueType min () const
 Return the smallest vector component. More...
 
__hostdev__ ValueType max () const
 Return the largest vector component. More...
 
__hostdev__ Coord floor () const
 Round each component if this Vec<T> up to its integer value. More...
 
__hostdev__ Coord ceil () const
 Round each component if this Vec<T> down to its integer value. More...
 
__hostdev__ Coord round () const
 Round each component if this Vec<T> to its closest integer value. More...
 
__hostdev__ T * asPointer ()
 return a non-const raw constant pointer to array of three vector components More...
 
__hostdev__ const T * asPointer () const
 return a const raw constant pointer to array of three vector components More...
 

Static Public Attributes

static const int SIZE = 3
 
static const int size = 3
 

Detailed Description

template<typename>
class nanovdb::Vec3< typename >

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

Definition at line 1279 of file NanoVDB.h.

Member Typedef Documentation

template<typename >
using nanovdb::Vec3< typename >::ValueType = T

Definition at line 1517 of file NanoVDB.h.

Constructor & Destructor Documentation

template<typename >
nanovdb::Vec3< typename >::Vec3 ( )
default
template<typename >
__hostdev__ nanovdb::Vec3< typename >::Vec3 ( x)
inlineexplicit

Definition at line 1519 of file NanoVDB.h.

template<typename >
__hostdev__ nanovdb::Vec3< typename >::Vec3 ( x,
y,
z 
)
inline

Definition at line 1523 of file NanoVDB.h.

template<typename >
template<template< class > class Vec3T, class T2 >
__hostdev__ nanovdb::Vec3< typename >::Vec3 ( const Vec3T< T2 > &  v)
inline

Definition at line 1528 of file NanoVDB.h.

template<typename >
template<typename T2 >
__hostdev__ nanovdb::Vec3< typename >::Vec3 ( const Vec3< T2 > &  v)
inlineexplicit

Definition at line 1534 of file NanoVDB.h.

template<typename >
__hostdev__ nanovdb::Vec3< typename >::Vec3 ( const Coord ijk)
inlineexplicit

Definition at line 1538 of file NanoVDB.h.

Member Function Documentation

template<typename >
__hostdev__ T* nanovdb::Vec3< typename >::asPointer ( )
inline

return a non-const raw constant pointer to array of three vector components

Definition at line 1668 of file NanoVDB.h.

template<typename >
__hostdev__ const T* nanovdb::Vec3< typename >::asPointer ( ) const
inline

return a const raw constant pointer to array of three vector components

Definition at line 1670 of file NanoVDB.h.

template<typename >
__hostdev__ Coord nanovdb::Vec3< typename >::ceil ( ) const
inline

Round each component if this Vec<T> down to its integer value.

Returns
Return an integer Coord

Definition at line 1653 of file NanoVDB.h.

template<typename >
template<typename Vec3T >
__hostdev__ Vec3 nanovdb::Vec3< typename >::cross ( const Vec3T &  v) const
inline

Definition at line 1558 of file NanoVDB.h.

template<typename >
template<typename Vec3T >
__hostdev__ T nanovdb::Vec3< typename >::dot ( const Vec3T &  v) const
inline

Definition at line 1556 of file NanoVDB.h.

template<typename >
__hostdev__ Coord nanovdb::Vec3< typename >::floor ( ) const
inline

Round each component if this Vec<T> up to its integer value.

Returns
Return an integer Coord

Definition at line 1650 of file NanoVDB.h.

template<typename >
__hostdev__ T nanovdb::Vec3< typename >::length ( void  ) const
inline

Definition at line 1568 of file NanoVDB.h.

template<typename >
__hostdev__ T nanovdb::Vec3< typename >::lengthSqr ( ) const
inline

Definition at line 1564 of file NanoVDB.h.

template<typename >
__hostdev__ ValueType nanovdb::Vec3< typename >::max ( ) const
inline

Return the largest vector component.

Definition at line 1644 of file NanoVDB.h.

template<typename >
__hostdev__ Vec3& nanovdb::Vec3< typename >::maxComponent ( const Vec3< typename > &  other)
inline

Perform a component-wise maximum with the other Coord.

Definition at line 1628 of file NanoVDB.h.

template<typename >
__hostdev__ ValueType nanovdb::Vec3< typename >::min ( ) const
inline

Return the smallest vector component.

Definition at line 1639 of file NanoVDB.h.

template<typename >
__hostdev__ Vec3& nanovdb::Vec3< typename >::minComponent ( const Vec3< typename > &  other)
inline

Perform a component-wise minimum with the other Coord.

Definition at line 1616 of file NanoVDB.h.

template<typename >
__hostdev__ Vec3& nanovdb::Vec3< typename >::normalize ( )
inline

Definition at line 1614 of file NanoVDB.h.

template<typename >
__hostdev__ bool nanovdb::Vec3< typename >::operator!= ( const Vec3< typename > &  rhs) const
inline

Definition at line 1543 of file NanoVDB.h.

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

Definition at line 1570 of file NanoVDB.h.

template<typename >
__hostdev__ Vec3 nanovdb::Vec3< typename >::operator* ( const T &  s) const
inline

Definition at line 1576 of file NanoVDB.h.

template<typename >
__hostdev__ Vec3& nanovdb::Vec3< typename >::operator*= ( const T &  s)
inline

Definition at line 1606 of file NanoVDB.h.

template<typename >
__hostdev__ Vec3 nanovdb::Vec3< typename >::operator+ ( const Vec3< typename > &  v) const
inline

Definition at line 1572 of file NanoVDB.h.

template<typename >
__hostdev__ Vec3 nanovdb::Vec3< typename >::operator+ ( const Coord ijk) const
inline

Definition at line 1574 of file NanoVDB.h.

template<typename >
__hostdev__ Vec3& nanovdb::Vec3< typename >::operator+= ( const Vec3< typename > &  v)
inline

Definition at line 1578 of file NanoVDB.h.

template<typename >
__hostdev__ Vec3& nanovdb::Vec3< typename >::operator+= ( const Coord ijk)
inline

Definition at line 1585 of file NanoVDB.h.

template<typename >
__hostdev__ Vec3 nanovdb::Vec3< typename >::operator- ( ) const
inline

Definition at line 1569 of file NanoVDB.h.

template<typename >
__hostdev__ Vec3 nanovdb::Vec3< typename >::operator- ( const Vec3< typename > &  v) const
inline

Definition at line 1573 of file NanoVDB.h.

template<typename >
__hostdev__ Vec3 nanovdb::Vec3< typename >::operator- ( const Coord ijk) const
inline

Definition at line 1575 of file NanoVDB.h.

template<typename >
__hostdev__ Vec3& nanovdb::Vec3< typename >::operator-= ( const Vec3< typename > &  v)
inline

Definition at line 1592 of file NanoVDB.h.

template<typename >
__hostdev__ Vec3& nanovdb::Vec3< typename >::operator-= ( const Coord ijk)
inline

Definition at line 1599 of file NanoVDB.h.

template<typename >
__hostdev__ Vec3 nanovdb::Vec3< typename >::operator/ ( const Vec3< typename > &  v) const
inline

Definition at line 1571 of file NanoVDB.h.

template<typename >
__hostdev__ Vec3 nanovdb::Vec3< typename >::operator/ ( const T &  s) const
inline

Definition at line 1577 of file NanoVDB.h.

template<typename >
__hostdev__ Vec3& nanovdb::Vec3< typename >::operator/= ( const T &  s)
inline

Definition at line 1613 of file NanoVDB.h.

template<typename >
template<template< class > class Vec3T, class T2 >
__hostdev__ Vec3& nanovdb::Vec3< typename >::operator= ( const Vec3T< T2 > &  rhs)
inline

Definition at line 1545 of file NanoVDB.h.

template<typename >
__hostdev__ bool nanovdb::Vec3< typename >::operator== ( const Vec3< typename > &  rhs) const
inline

Definition at line 1542 of file NanoVDB.h.

template<typename >
__hostdev__ const T& nanovdb::Vec3< typename >::operator[] ( int  i) const
inline

Definition at line 1553 of file NanoVDB.h.

template<typename >
__hostdev__ T& nanovdb::Vec3< typename >::operator[] ( int  i)
inline

Definition at line 1554 of file NanoVDB.h.

template<typename >
__hostdev__ Coord nanovdb::Vec3< typename >::round ( ) const
inline

Round each component if this Vec<T> to its closest integer value.

Returns
Return an integer Coord

Definition at line 1656 of file NanoVDB.h.

Member Data Documentation

template<typename >
const int nanovdb::Vec3< typename >::SIZE = 3
static

Definition at line 1515 of file NanoVDB.h.

template<typename >
const int nanovdb::Vec3< typename >::size = 3
static

Definition at line 1516 of file NanoVDB.h.


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