sandbox
Loading...
Searching...
No Matches
sbx::math::basic_vector3< Type > Class Template Reference
Inheritance diagram for sbx::math::basic_vector3< Type >:
sbx::math::basic_vector< 3u, Type >

Public Types

using value_type = base_type::value_type
 
using reference = base_type::reference
 
using const_reference = base_type::const_reference
 
using size_type = base_type::size_type
 
using length_type = base_type::length_type
 
- Public Types inherited from sbx::math::basic_vector< 3u, Type >
using value_type = Type
 
using reference = value_type &
 
using const_reference = const value_type &
 
using size_type = std::size_t
 
using length_type = std::float_t
 

Public Member Functions

constexpr basic_vector3 (const base_type &base) noexcept
 
template<scalar X, scalar Y, scalar Z>
constexpr basic_vector3 (X x, Y y, Z z) noexcept
 
template<scalar Other, scalar Scalar = Other>
constexpr basic_vector3 (const basic_vector2< Other > &vector, Scalar z=Scalar{0}) noexcept
 
constexpr operator basic_vector2< Type > () const noexcept
 
constexpr auto x () noexcept -> reference
 
constexpr auto x () const noexcept -> const_reference
 
constexpr auto y () noexcept -> reference
 
constexpr auto y () const noexcept -> const_reference
 
constexpr auto z () noexcept -> reference
 
constexpr auto z () const noexcept -> const_reference
 
constexpr auto normalize () noexcept -> basic_vector3 &
 
- Public Member Functions inherited from sbx::math::basic_vector< 3u, Type >
constexpr basic_vector (Other value=Other{0}) noexcept
 
constexpr basic_vector (const basic_vector< Size, Other > &other) noexcept
 
constexpr auto data () noexcept -> value_type *
 
constexpr auto operator[] (size_type index) noexcept -> reference
 
constexpr auto operator[] (size_type index) const noexcept -> const_reference
 
constexpr auto operator+= (const basic_vector< Size, Other > &other) noexcept -> basic_vector &
 
constexpr auto operator-= (const basic_vector< Size, Other > &other) noexcept -> basic_vector &
 
constexpr auto operator*= (Other scalar) noexcept -> basic_vector &
 
constexpr auto operator*= (const basic_vector< Size, Other > &other) noexcept -> basic_vector &
 
constexpr auto operator/= (Other scalar) noexcept -> basic_vector &
 
constexpr auto length_squared () const noexcept -> length_type
 
constexpr auto length () const noexcept -> length_type
 
constexpr auto normalize () noexcept -> basic_vector &
 

Static Public Member Functions

static constexpr auto cross (const basic_vector3 &lhs, const basic_vector3 &rhs) noexcept -> basic_vector3
 
static constexpr auto dot (const basic_vector3 &lhs, const basic_vector3 &rhs) noexcept -> length_type
 
static constexpr auto normalized (const basic_vector3 &vector) noexcept -> basic_vector3
 
static constexpr auto reflect (const basic_vector3 &vector, const basic_vector3 &normal) noexcept -> basic_vector3
 
static constexpr auto abs (const basic_vector3 &vector) noexcept -> basic_vector3
 

Static Public Attributes

static constexpr basic_vector3 zero {base_type::fill(value_type{0})}
 
static constexpr basic_vector3 one {base_type::fill(value_type{1})}
 
static constexpr basic_vector3 right {base_type::template axis<x_axis>(value_type{1})}
 
static constexpr basic_vector3 left {base_type::template axis<x_axis>(value_type{-1})}
 
static constexpr basic_vector3 up {base_type::template axis<y_axis>(value_type{1})}
 
static constexpr basic_vector3 down {base_type::template axis<y_axis>(value_type{-1})}
 
static constexpr basic_vector3 forward {base_type::template axis<z_axis>(value_type{-1})}
 
static constexpr basic_vector3 backward {base_type::template axis<z_axis>(value_type{1})}
 

Additional Inherited Members

- Protected Member Functions inherited from sbx::math::basic_vector< 3u, Type >
constexpr basic_vector (Args &&... args) noexcept
 
constexpr basic_vector (std::array< value_type, Size > &&components) noexcept
 
- Static Protected Member Functions inherited from sbx::math::basic_vector< 3u, Type >
static constexpr auto fill (Other value) noexcept -> basic_vector
 
static constexpr auto axis (Other value) noexcept -> basic_vector
 

The documentation for this class was generated from the following files: