template<typename T>
hub::Vec3 struct

Generic 3-d vector (x,y,z) with Scalar x, y, z.

Constructors, destructors, conversion operators

Vec3() defaulted
Vec3(Vec3 const&) defaulted
Vec3(Vec3&&) defaulted
Vec3(value_type s) explicit
Vec3(value_type vx, value_type vy, value_type vz)

Public functions

auto operator=(Vec3 const&) -> Vec3& defaulted
auto operator=(Vec3&&) -> Vec3& defaulted
template<typename U>
auto operator+(const Vec3<U>& v) const -> Vec3
template<typename U>
auto operator-(const Vec3<U>& v) const -> Vec3
template<typename U>
auto operator*(const Vec3<U>& v) const -> Vec3
template<typename U>
auto operator/(const Vec3<U>& v) const -> Vec3
auto operator+(const value_type c) const -> Vec3
auto operator-(const value_type c) const -> Vec3
auto operator*(const value_type c) const -> Vec3
auto operator/(const value_type c) const -> Vec3
auto operator-() const -> Vec3
auto abs() const -> Vec3
template<typename U>
auto operator+=(const Vec3<U>& v) -> const Vec3&
template<typename U>
auto operator-=(const Vec3<U>& v) -> const Vec3&
template<typename U>
auto operator*=(const Vec3<U>& v) -> const Vec3&
template<typename U>
auto operator/=(const Vec3<U>& v) -> const Vec3&
auto operator+=(const value_type c) -> const Vec3&
auto operator-=(const value_type c) -> const Vec3&
auto operator*=(const value_type c) -> const Vec3&
auto operator/=(const value_type c) -> const Vec3&
auto operator=(const value_type s) -> Vec3&
auto norm() const -> value_type deprecated
auto norm2() const -> value_type deprecated
auto max_component() const -> value_type deprecated
auto re_norm() const -> value_type deprecated

Public variables

value_type x
value_type y
value_type z

Friends

auto operator+(const value_type c, const Vec3& v) -> Vec3
auto operator-(const value_type c, const Vec3& v) -> Vec3
auto operator*(const value_type c, const Vec3& v) -> Vec3
auto operator/(const value_type c, const Vec3& v) -> Vec3
auto operator<<(std::ostream& output, const Vec3& v) -> std::ostream&
auto operator>>(std::istream& input, Vec3& v) -> std::istream&

Function documentation

template<typename T>
hub::Vec3<T>::Vec3() defaulted

Default constructor.

template<typename T>
hub::Vec3<T>::Vec3(Vec3 const&) defaulted

Default copy constructor.

template<typename T>
hub::Vec3<T>::Vec3(Vec3&&) defaulted

Default move constructor

template<typename T>
hub::Vec3<T>::Vec3(value_type s) explicit

Parameters
in single scalar.

Create a vector (s,s,s)

template<typename T>
hub::Vec3<T>::Vec3(value_type vx, value_type vy, value_type vz)

Parameters
vx in x component.
vy in y component.
vz in z component.

Create a vector from 3 scalar.

template<typename T>
Vec3& hub::Vec3<T>::operator=(Vec3 const&) defaulted

Default copy assignment operator

template<typename T>
Vec3& hub::Vec3<T>::operator=(Vec3&&) defaulted

Default move assignment operator

template<typename T> template<typename U>
Vec3 hub::Vec3<T>::operator+(const Vec3<U>& v) const

Addition by wise

template<typename T> template<typename U>
Vec3 hub::Vec3<T>::operator-(const Vec3<U>& v) const

Subtraction by wise

template<typename T> template<typename U>
Vec3 hub::Vec3<T>::operator*(const Vec3<U>& v) const

Product by wise

template<typename T> template<typename U>
Vec3 hub::Vec3<T>::operator/(const Vec3<U>& v) const

Division by wise

template<typename T>
Vec3 hub::Vec3<T>::operator+(const value_type c) const

Add scalar by wise

template<typename T>
Vec3 hub::Vec3<T>::operator-(const value_type c) const

Subtract scalar by wise

template<typename T>
Vec3 hub::Vec3<T>::operator*(const value_type c) const

Multiply scalar by wise

template<typename T>
Vec3 hub::Vec3<T>::operator/(const value_type c) const

Divide scalar by wise

template<typename T>
Vec3 hub::Vec3<T>::operator-() const

Opposite vector

template<typename T>
Vec3 hub::Vec3<T>::abs() const

Absolute value by wise

template<typename T> template<typename U>
const Vec3& hub::Vec3<T>::operator+=(const Vec3<U>& v)

Addition assignment for vector

template<typename T> template<typename U>
const Vec3& hub::Vec3<T>::operator-=(const Vec3<U>& v)

Subtraction assignment for vector

template<typename T> template<typename U>
const Vec3& hub::Vec3<T>::operator*=(const Vec3<U>& v)

Multiple assignment for vector

template<typename T> template<typename U>
const Vec3& hub::Vec3<T>::operator/=(const Vec3<U>& v)

Division assignment for vector

template<typename T>
const Vec3& hub::Vec3<T>::operator+=(const value_type c)

Addition assignment for scalar

template<typename T>
const Vec3& hub::Vec3<T>::operator-=(const value_type c)

Subtraction assignment for scalar

template<typename T>
const Vec3& hub::Vec3<T>::operator*=(const value_type c)

Multiple assignment for scalar

template<typename T>
const Vec3& hub::Vec3<T>::operator/=(const value_type c)

Division assignment for scalar

template<typename T>
Vec3& hub::Vec3<T>::operator=(const value_type s)

Assignment operator for scalar

template<typename T>
value_type hub::Vec3<T>::norm() const

template<typename T>
value_type hub::Vec3<T>::norm2() const

template<typename T>
value_type hub::Vec3<T>::max_component() const

template<typename T>
value_type hub::Vec3<T>::re_norm() const

template<typename T>
Vec3 operator+(const value_type c, const Vec3& v)

operator+ for left scalar operation

template<typename T>
Vec3 operator-(const value_type c, const Vec3& v)

operator- for left scalar operation

template<typename T>
Vec3 operator*(const value_type c, const Vec3& v)

operator* for left scalar operation

template<typename T>
Vec3 operator/(const value_type c, const Vec3& v)

operator/ for left scalar operation

template<typename T>
std::ostream& operator<<(std::ostream& output, const Vec3& v)

output stream

template<typename T>
std::istream& operator>>(std::istream& input, Vec3& v)

input stream

Variable documentation

template<typename T>
value_type hub::Vec3<T>::x

x component.

template<typename T>
value_type hub::Vec3<T>::y

y component.

template<typename T>
value_type hub::Vec3<T>::z

z component.