![]() |
OpenVDB 13.1.0
|
A simple vector class with three components, similar to openvdb::math::Vec3. More...
#include <nanovdb/math/Math.h>
Public Types | |
| using | ValueType = T |
Public Member Functions | |
| Vec2 ()=default | |
| __hostdev__ | Vec2 (T x) |
| __hostdev__ | Vec2 (T x, T y) |
| template<template< class > class Vec2T, class T2> | |
| __hostdev__ | Vec2 (const Vec2T< T2 > &v) |
| template<typename T2> | |
| __hostdev__ | Vec2 (const Vec2< T2 > &v) |
| __hostdev__ | Vec2 (const Coord2 &ijk) |
| __hostdev__ bool | operator== (const Vec2 &rhs) const |
| __hostdev__ bool | operator!= (const Vec2 &rhs) const |
| template<template< class > class Vec2T, class T2> | |
| __hostdev__ Vec2 & | operator= (const Vec2T< T2 > &rhs) |
| __hostdev__ const T & | operator[] (int i) const |
| __hostdev__ T & | operator[] (int i) |
| template<typename Vec2T> | |
| __hostdev__ T | dot (const Vec2T &v) const |
| __hostdev__ T | lengthSqr () const |
| __hostdev__ T | length () const |
| __hostdev__ Vec2 | operator- () const |
| __hostdev__ Vec2 | operator* (const Vec2 &v) const |
| __hostdev__ Vec2 | operator/ (const Vec2 &v) const |
| __hostdev__ Vec2 | operator+ (const Vec2 &v) const |
| __hostdev__ Vec2 | operator- (const Vec2 &v) const |
| __hostdev__ Vec2 | operator+ (const Coord &ijk) const |
| __hostdev__ Vec2 | operator- (const Coord &ijk) const |
| __hostdev__ Vec2 | operator* (const T &s) const |
| __hostdev__ Vec2 | operator/ (const T &s) const |
| __hostdev__ Vec2 & | operator+= (const Vec2 &v) |
| __hostdev__ Vec2 & | operator+= (const Coord &ijk) |
| __hostdev__ Vec2 & | operator-= (const Vec2 &v) |
| __hostdev__ Vec2 & | operator-= (const Coord &ijk) |
| __hostdev__ Vec2 & | operator*= (const T &s) |
| __hostdev__ Vec2 & | operator/= (const T &s) |
| __hostdev__ Vec2 & | normalize () |
| __hostdev__ Vec2 & | minComponent (const Vec2 &other) |
| Perform a component-wise minimum with the other Coord. | |
| __hostdev__ Vec2 & | maxComponent (const Vec2 &other) |
| Perform a component-wise maximum with the other Coord. | |
| __hostdev__ ValueType | min () const |
| Return the smallest vector component. | |
| __hostdev__ ValueType | max () const |
| Return the largest vector component. | |
| __hostdev__ Coord2 | floor () const |
| Round each component if this Vec<T> up to its integer value. | |
| __hostdev__ Coord2 | ceil () const |
| Round each component if this Vec<T> down to its integer value. | |
| __hostdev__ Coord2 | round () const |
| Round each component if this Vec<T> to its closest integer value. | |
| __hostdev__ T * | asPointer () |
| return a non-const raw constant pointer to array of three vector components | |
| __hostdev__ const T * | asPointer () const |
| return a const raw constant pointer to array of three vector components | |
Static Public Attributes | |
| static const int | SIZE = 2 |
| static const int | size = 2 |
A simple vector class with three components, similar to openvdb::math::Vec3.
| using ValueType = T |
|
default |
|
inlineexplicit |
|
inline |
|
inline |
|
inlineexplicit |
|
inline |
return a non-const raw constant pointer to array of three vector components
|
inline |
return a const raw constant pointer to array of three vector components
|
inline |
Round each component if this Vec<T> down to its integer value.
|
inline |
Round each component if this Vec<T> up to its integer value.
|
inline |
|
inline |
|
inline |
Return the largest vector component.
|
inline |
Perform a component-wise maximum with the other Coord.
|
inline |
Return the smallest vector component.
|
inline |
Perform a component-wise minimum with the other Coord.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Round each component if this Vec<T> to its closest integer value.
|
static |
|
static |