Loading...
Searching...
No Matches
Vec4< T > Class Template Reference

A simple vector class with four 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)
template<template< class > class Vec4T, class T2 >
| Vec4 (const Vec4T< T2 > &v)
bool | operator== (const Vec4 &rhs) const
bool | operator!= (const Vec4 &rhs) const
template<template< class > class Vec4T, class T2 >
Vec4 & | operator= (const Vec4T< T2 > &rhs)
const T & | operator[] (int i) const
T & | operator[] (int i)
template<typename Vec4T >
T | dot (const Vec4T &v) const
T | lengthSqr () const
T | 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
Vec4 & | operator+= (const Vec4 &v)
Vec4 & | operator-= (const Vec4 &v)
Vec4 & | operator*= (const T &s)
Vec4 & | operator/= (const T &s)
Vec4 & | normalize ()
Vec4 & | minComponent (const Vec4 &other)
| Perform a component-wise minimum with the other Coord.
Vec4 & | maxComponent (const Vec4 &other)
| Perform a component-wise maximum with the other Coord.

## Static Public Attributes

static const int | SIZE = 4
static const int | size = 4

## Detailed Description

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

A simple vector class with four components, similar to openvdb::math::Vec4.

## Member Typedef Documentation

## ValueType

template<typename T >

using ValueType = T

## Constructor & Destructor Documentation

## Vec4() [1/5]

template<typename T >

Vec4 | ( |  | ) |

default

## Vec4() [2/5]

template<typename T >

Vec4 | ( | T | x | ) |

inlineexplicit

## Vec4() [3/5]

template<typename T >

Vec4 | ( | T | x,
|  | T | y,
|  | T | z,
|  | T | w
| ) |  |

inline

## Vec4() [4/5]

template<typename T >
template<typename T2 >

Vec4 | ( | const Vec4< T2 > & | v | ) |

inlineexplicit

## Vec4() [5/5]

template<typename T >
template<template< class > class Vec4T, class T2 >

Vec4 | ( | const Vec4T< T2 > & | v | ) |

inline

## Member Function Documentation

## dot()

template<typename T >
template<typename Vec4T >

T dot | ( | const Vec4T & | v | ) | const

inline

## length()

template<typename T >

T length | ( |  | ) | const

inline

## lengthSqr()

template<typename T >

T lengthSqr | ( |  | ) | const

inline

## maxComponent()

template<typename T >

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

inline

Perform a component-wise maximum with the other Coord.

## minComponent()

template<typename T >

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

inline

Perform a component-wise minimum with the other Coord.

## normalize()

template<typename T >

Vec4 & normalize | ( |  | ) |

inline

## operator!=()

template<typename T >

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

inline

## operator*() [1/2]

template<typename T >

Vec4 operator* | ( | const T & | s | ) | const

inline

## operator*() [2/2]

template<typename T >

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

inline

## operator*=()

template<typename T >

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

inline

## operator+()

template<typename T >

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

inline

## operator+=()

template<typename T >

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

inline

## operator-() [1/2]

template<typename T >

Vec4 operator- | ( |  | ) | const

inline

## operator-() [2/2]

template<typename T >

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

inline

## operator-=()

template<typename T >

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

inline

## operator/() [1/2]

template<typename T >

Vec4 operator/ | ( | const T & | s | ) | const

inline

## operator/() [2/2]

template<typename T >

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

inline

## operator/=()

template<typename T >

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

inline

## operator=()

template<typename T >
template<template< class > class Vec4T, class T2 >

Vec4 & operator= | ( | const Vec4T< T2 > & | rhs | ) |

inline

## operator==()

template<typename T >

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

inline

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

template<typename T >

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

inline

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

template<typename T >

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

inline

## Member Data Documentation

## SIZE

template<typename T >

const int SIZE = 4

static

## size

template<typename T >

const int size = 4

static