omni::math::linalg::vec4

Defined in usdrt/gf/vec.h

Functions

Typedefs

Variables

template<typename T>
class vec4 : public omni::math::linalg::base_vec<T, 4>

Public Types

using base_type = base_vec<T, 4>
using this_type = vec4<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

vec4() = default
constexpr vec4(const vec4<T>&) = default
inline constexpr vec4(const base_type &other)
inline explicit constexpr vec4(T value)
inline constexpr vec4(T v0, T v1, T v2, T v3)
template<typename OTHER_T>
inline explicit constexpr vec4(const OTHER_T *p)
template<typename OTHER_T>
inline explicit vec4(const vec4<OTHER_T> &other)
template<typename OTHER_T>
inline explicit vec4(const base_vec<OTHER_T, 4> &other)
template<typename OTHER_T>
inline vec4(const std::initializer_list<OTHER_T> &other)
inline this_type &Set(T v0, T v1, T v2, T v3)
inline this_type &Set(T *p)
template<typename OTHER_T>
inline bool operator==(const vec4<OTHER_T> &other) const
template<typename OTHER_T>
inline bool operator!=(const vec4<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 vec3<T> Project() 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 vec4<T> XAxis()
static inline constexpr vec4<T> YAxis()
static inline constexpr vec4<T> ZAxis()
static inline constexpr vec4<T> WAxis()
static inline vec4<T> Axis(size_t axis)

Public Static Attributes

static constexpr size_t tuple_size
static const size_t dimension

Protected Attributes

T v[N]