omni::math::linalg::base_vec

Defined in usdrt/gf/vec.h

template<typename T, size_t N>
class base_vec

Subclassed by omni::math::linalg::vec2< int >

Public Types

using value_type = T
using size_type = size_t
using difference_type = ptrdiff_t
using reference = value_type&
using const_reference = const value_type&
using pointer = value_type*
using const_pointer = const value_type*
using iterator = pointer
using const_iterator = const_pointer
using ScalarType = T

Public Functions

base_vec() = default
constexpr base_vec(const base_vec<T, N>&) = default
inline explicit constexpr base_vec(T value)
template<typename OTHER_T>
inline explicit constexpr base_vec(const base_vec<OTHER_T, N> &other)
template<typename OTHER_T0, typename OTHER_T1, typename ...Args>
inline constexpr base_vec(OTHER_T0 a, OTHER_T1 b, Args... args) noexcept
template<typename OTHER_T>
inline base_vec(const std::initializer_list<OTHER_T> &other) noexcept
inline constexpr T &operator[](size_t i) noexcept
inline constexpr const T &operator[](size_t i) const noexcept
inline constexpr T *data() noexcept
inline constexpr const T *data() const noexcept
inline const T *GetArray() const
inline constexpr T Dot(const base_vec<T, N> &other) const
inline constexpr T GetLengthSq() const
inline auto GetLength() const
inline auto Normalize()
inline constexpr T operator*(const base_vec<T, N> &other) const
inline constexpr base_vec<T, N> &operator+=(const base_vec<T, N> &that) noexcept
inline constexpr base_vec<T, N> &operator-=(const base_vec<T, N> &that) noexcept
inline constexpr base_vec<T, N> &operator*=(const T that) noexcept
inline constexpr base_vec<T, N> &operator/=(const T that) noexcept

Public Static Functions

static inline base_vec<T, N> Axis(size_t axis)

Public Static Attributes

static constexpr size_t tuple_size = N
static const size_t dimension = N

Protected Attributes

T v[N]