omni::math::linalg::vec2

Defined in usdrt/gf/vec.h

Functions

Typedefs

Variables

template<typename T>
class vec2 : public omni::math::linalg::base_vec<T, 2>

Public Types

using base_type = base_vec<T, 2>
using this_type = vec2<T>
using ScalarType = T
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

Public Functions

vec2() = default
constexpr vec2(const vec2<T>&) = default
inline constexpr vec2(const base_type &other)
inline explicit constexpr vec2(T value)
inline constexpr vec2(T v0, T v1)
template<typename OTHER_T>
inline explicit constexpr vec2(const OTHER_T *p)
template<typename OTHER_T>
inline explicit vec2(const vec2<OTHER_T> &other)
template<typename OTHER_T>
inline explicit vec2(const base_vec<OTHER_T, 2> &other)
template<typename OTHER_T>
inline vec2(const std::initializer_list<OTHER_T> &other)
inline this_type &Set(T v0, T v1)
inline this_type &Set(T *p)
template<typename OTHER_T>
inline bool operator==(const vec2<OTHER_T> &other) const
template<typename OTHER_T>
inline bool operator!=(const vec2<OTHER_T> &other) const
inline this_type GetProjection(const this_type &unitVector) const
inline this_type GetComplement(const this_type &unitVector) const
inline this_type GetNormalized() const
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 constexpr vec2<T> XAxis()
static inline constexpr vec2<T> YAxis()
static inline vec2<T> Axis(size_t axis)

Public Static Attributes

static constexpr size_t tuple_size
static const size_t dimension

Protected Attributes

T v[N]