OpenVDB  8.1.1
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
Tuple< SIZE, T > Class Template Reference

#include <Tuple.h>

Public Types

using value_type = T
 
using ValueType = T
 

Public Member Functions

 Tuple ()=default
 
template<int src_size, typename src_valtype >
 Tuple (Tuple< src_size, src_valtype > const &src)
 Conversion constructor. More...
 
operator[] (int i) const
 
T & operator[] (int i)
 
std::string str () const
 
void write (std::ostream &os) const
 
void read (std::istream &is)
 
bool isNan () const
 True if a Nan is present in this tuple. More...
 
bool isInfinite () const
 True if an Inf is present in this tuple. More...
 
bool isFinite () const
 True if no Nan or Inf values are present. More...
 
bool isZero () const
 True if all elements are exactly zero. More...
 
Compatibility

These are mostly for backwards compability with functions that take old-style Vs (which are just arrays).

template<typename S >
void toV (S *v) const
 Copies this tuple into an array of a compatible type. More...
 
value_typeasV ()
 Exposes the internal array. Be careful when using this function. More...
 
value_type const * asV () const
 Exposes the internal array. Be careful when using this function. More...
 

Static Public Attributes

static const int size = SIZE
 

Protected Attributes

mm [SIZE]
 

Detailed Description

template<int SIZE, typename T>
class openvdb::v8_1::math::Tuple< SIZE, T >

A base class for homogenous tuple types

Member Typedef Documentation

using value_type = T
using ValueType = T

Constructor & Destructor Documentation

Tuple ( )
default

Trivial constructor, the Tuple is NOT initialized

Note
destructor, copy constructor, assignment operator and move constructor are left to be defined by the compiler (default)
Tuple ( Tuple< src_size, src_valtype > const &  src)
inlineexplicit

Conversion constructor.

Tuples with different value types and different sizes can be interconverted using this member. Converting from a larger tuple results in truncation; converting from a smaller tuple results in the extra data members being zeroed out. This function assumes that the integer 0 is convertible to the tuple's value type.

Member Function Documentation

value_type* asV ( )
inline

Exposes the internal array. Be careful when using this function.

value_type const* asV ( ) const
inline

Exposes the internal array. Be careful when using this function.

bool isFinite ( ) const
inline

True if no Nan or Inf values are present.

bool isInfinite ( ) const
inline

True if an Inf is present in this tuple.

bool isNan ( ) const
inline

True if a Nan is present in this tuple.

bool isZero ( ) const
inline

True if all elements are exactly zero.

T operator[] ( int  i) const
inline
T& operator[] ( int  i)
inline
void read ( std::istream &  is)
inline
std::string str ( ) const
inline
Returns
string representation of Classname
void toV ( S *  v) const
inline

Copies this tuple into an array of a compatible type.

void write ( std::ostream &  os) const
inline

Member Data Documentation

T mm[SIZE]
protected
const int size = SIZE
static

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