OpenVDB: Vec3< T > Class Template Reference

OpenVDB 9.0.0

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

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

`#include <nanovdb/NanoVDB.h>`

## Public Types
using | ValueType = T

## Public Member Functions
| Vec3 ()=default
| Vec3 (T x)
| Vec3 (T x, T y, T z)
template<typename T2 >
| Vec3 (const Vec3< T2 > &v)
| Vec3 (const Coord &ijk)
bool | operator== (const Vec3 &rhs) const
bool | operator!= (const Vec3 &rhs) const
template<typename Vec3T >
Vec3 & | operator= (const Vec3T &rhs)
const T & | operator[] (int i) const
T & | operator[] (int i)
template<typename Vec3T >
T | dot (const Vec3T &v) const
template<typename Vec3T >
Vec3 | cross (const Vec3T &v) const
T | lengthSqr () const
T | length () const
Vec3 | operator- () const
Vec3 | operator* (const Vec3 &v) const
Vec3 | operator/ (const Vec3 &v) const
Vec3 | operator+ (const Vec3 &v) const
Vec3 | operator- (const Vec3 &v) const
Vec3 | operator* (const T &s) const
Vec3 | operator/ (const T &s) const
Vec3 & | operator+= (const Vec3 &v)
Vec3 & | operator-= (const Vec3 &v)
Vec3 & | operator*= (const T &s)
Vec3 & | operator/= (const T &s)
Vec3 & | normalize ()
Vec3 & | minComponent (const Vec3 &other)
| Perform a component-wise minimum with the other Coord. More...
Vec3 & | maxComponent (const Vec3 &other)
| Perform a component-wise maximum with the other Coord. More...
ValueType | min () const
| Return the smallest vector component. More...
ValueType | max () const
| Return the largest vector component. More...
Coord | floor () const
Coord | ceil () const
Coord | round () const

## Static Public Attributes
static const int | SIZE = 3

## Detailed Description

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

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

## Member Typedef Documentation

## ◆ ValueType

using ValueType = T

## Constructor & Destructor Documentation

## ◆ Vec3() [1/5]

Vec3 | ( |  | ) |
| default

## ◆ Vec3() [2/5]

Vec3 | ( | T | x | ) |
| inlineexplicit

## ◆ Vec3() [3/5]

Vec3 | ( | T | x,
|  | T | y,
|  | T | z
| ) |  |
| inline

## ◆ Vec3() [4/5]

Vec3 | ( | const Vec3< T2 > & | v | ) |
| inlineexplicit

## ◆ Vec3() [5/5]

Vec3 | ( | const Coord & | ijk | ) |
| inlineexplicit

## Member Function Documentation

## ◆ ceil()

Coord ceil | ( |  | ) | const
| inline

## ◆ cross()

Vec3 cross | ( | const Vec3T & | v | ) | const
| inline

## ◆ dot()

T dot | ( | const Vec3T & | v | ) | const
| inline

## ◆ floor()

Coord floor | ( |  | ) | const
| inline

## ◆ length()

T length | ( |  | ) | const
| inline

## ◆ lengthSqr()

T lengthSqr | ( |  | ) | const
| inline

## ◆ max()

ValueType max | ( |  | ) | const
| inline

Return the largest vector component.

## ◆ maxComponent()

Vec3 & maxComponent | ( | const Vec3< T > & | other | ) |
| inline

Perform a component-wise maximum with the other Coord.

## ◆ min()

ValueType min | ( |  | ) | const
| inline

Return the smallest vector component.

## ◆ minComponent()

Vec3 & minComponent | ( | const Vec3< T > & | other | ) |
| inline

Perform a component-wise minimum with the other Coord.

## ◆ normalize()

Vec3 & normalize | ( |  | ) |
| inline

## ◆ operator!=()

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

## ◆ operator*() [1/2]

Vec3 operator* | ( | const T & | s | ) | const
| inline

## ◆ operator*() [2/2]

Vec3 operator* | ( | const Vec3< T > & | v | ) | const
| inline

## ◆ operator*=()

Vec3 & operator*= | ( | const T & | s | ) |
| inline

## ◆ operator+()

Vec3 operator+ | ( | const Vec3< T > & | v | ) | const
| inline

## ◆ operator+=()

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

## ◆ operator-() [1/2]

Vec3 operator- | ( |  | ) | const
| inline

## ◆ operator-() [2/2]

Vec3 operator- | ( | const Vec3< T > & | v | ) | const
| inline

## ◆ operator-=()

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

## ◆ operator/() [1/2]

Vec3 operator/ | ( | const T & | s | ) | const
| inline

## ◆ operator/() [2/2]

Vec3 operator/ | ( | const Vec3< T > & | v | ) | const
| inline

## ◆ operator/=()

Vec3 & operator/= | ( | const T & | s | ) |
| inline

## ◆ operator=()

Vec3 & operator= | ( | const Vec3T & | rhs | ) |
| inline

## ◆ operator==()

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

## ◆ operator[]() [1/2]

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

## ◆ operator[]() [2/2]

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

## ◆ round()

Coord round | ( |  | ) | const
| inline

## Member Data Documentation

## ◆ SIZE

const int SIZE = 3
| static