template <typename Scalar, size_t Dimensions>
muu::sat_tester struct

A helper utility for performing Separating-Axis Theorem tests.

Template parameters
Scalar The vector scalar component type.
Dimensions The number of dimensions.

Public types

using scalar_type = Scalar
The sat_tester's scalar type.
using vector_type = vector<scalar_type, Dimensions>
The sat_tester's vector type.

Public static variables

static size_t dimensions constexpr
The number of dimensions represented by this sat_tester's vector_type.

Constructors, destructors, conversion operators

sat_tester() constexpr noexcept
Default constructor.
sat_tester(scalar_type min_max) explicit constexpr noexcept
Initializes the SAT test projection range bounds to a specific value.
template <typename... T>
sat_tester(const vector_type& axis, const vector_type& point, const T&... points) constexpr noexcept
Initializes the SAT test projection range directly from one or more points.
template <size_t Dimension, typename... T>
sat_tester(index_tag<Dimension>, const vector_type& point, const T&... points) constexpr noexcept
Initializes the SAT test projection range directly from one or more points.
template <size_t N>
sat_tester(const vector_type& axis, const vector_type(&points)[N]) constexpr noexcept
Initializes the SAT test projection range directly from an array of points.
template <size_t Dimension, size_t N>
sat_tester(index_tag<Dimension>, const vector_type(&points)[N]) constexpr noexcept
Initializes the SAT test projection range directly from an array of points.

Public functions

template <typename... T>
auto add(const vector_type& axis, const vector_type& point, const T&... points) -> sat_tester& constexpr noexcept
Adds one or more points to the SAT test projection range.
template <size_t Dimension, typename... T>
auto add(index_tag<Dimension>, const vector_type& point, const T&... points) -> sat_tester& constexpr noexcept
Adds one or more points to the SAT test projection range.
template <size_t N>
auto add(const vector_type& axis, const vector_type(&points)[N]) -> sat_tester& constexpr noexcept
Adds an array of points to the SAT test projection range.
auto add(const vector_type& axis, const vector_type* begin, const vector_type* end) -> sat_tester& constexpr noexcept
Adds a range of points to the SAT test projection range.
template <size_t Dimension>
auto add(index_tag<Dimension>, const vector_type* begin, const vector_type* end) -> sat_tester& constexpr noexcept
Adds a range of points to the SAT test projection range.
auto operator()(scalar_type val) -> bool constexpr noexcept
Returns true if the SAT test projection range seen so far contains the given value.
auto operator()(scalar_type min_val, scalar_type max_val) -> bool constexpr noexcept
Returns true if the SAT test projection range seen so far overlaps the given range.
auto operator()(const sat_tester& other) -> bool constexpr noexcept
Returns true if the SAT test projection range seen so far overlaps that of another sat_tester.
auto reset() -> sat_tester& constexpr noexcept
Resets the SAT tester to the default-constructed state.

Public variables

scalar_type min
The minimum projection seen so far.
scalar_type max
The maximum projection seen so far.