Blender V5.3
blender::bounds::detail Namespace Reference

Functions

template<typename T>
Bounds< T > min_max_lanes (const Span< T > values)
template<typename T, typename RadiusT>
Bounds< T > min_max_lanes_with_radii (const Span< T > values, const Span< RadiusT > radii)
template<typename T, int Size>
bool any_less_than_v (const VecBase< T, Size > &a, const VecBase< T, Size > &b)
template<typename T, int Size>
bool any_greater_than_v (const VecBase< T, Size > &a, const VecBase< T, Size > &b)
template<typename T, int Size>
bool any_less_or_equal_than_v (const VecBase< T, Size > &a, const VecBase< T, Size > &b)
template<typename T>
bool any_less_than (const T &a, const T &b)
template<typename T>
bool any_greater_than (const T &a, const T &b)
template<typename T>
bool any_less_or_equal_than (const T &a, const T &b)
template<typename T>
Bounds< T > segment_bounds (const T &start, const T &end)
template<typename T>
bool rational_greater_than (const T &p1, const T &q1, const T &p2, const T &q2)
template<typename T>
bool rational_less_than (const T &p1, const T &q1, const T &p2, const T &q2)
template<typename T, int Size>
bool segment_enter_exit_bounds (const Bounds< VecBase< T, Size > > &bounds, const VecBase< T, Size > &start, const VecBase< T, Size > &end)

Function Documentation

◆ any_greater_than()

template<typename T>
bool blender::bounds::detail::any_greater_than ( const T & a,
const T & b )
inlinenodiscard

Definition at line 436 of file BLI_bounds.hh.

References any_greater_than(), any_greater_than_v(), b, and T.

Referenced by any_greater_than(), and blender::Bounds< T >::contains().

◆ any_greater_than_v()

template<typename T, int Size>
bool blender::bounds::detail::any_greater_than_v ( const VecBase< T, Size > & a,
const VecBase< T, Size > & b )
inlinenodiscard

Definition at line 404 of file BLI_bounds.hh.

References any_greater_than_v(), and b.

Referenced by any_greater_than(), and any_greater_than_v().

◆ any_less_or_equal_than()

template<typename T>
bool blender::bounds::detail::any_less_or_equal_than ( const T & a,
const T & b )
inlinenodiscard

◆ any_less_or_equal_than_v()

template<typename T, int Size>
bool blender::bounds::detail::any_less_or_equal_than_v ( const VecBase< T, Size > & a,
const VecBase< T, Size > & b )
inlinenodiscard

Definition at line 415 of file BLI_bounds.hh.

References any_less_or_equal_than_v(), and b.

Referenced by any_less_or_equal_than(), and any_less_or_equal_than_v().

◆ any_less_than()

template<typename T>
bool blender::bounds::detail::any_less_than ( const T & a,
const T & b )
inlinenodiscard

Definition at line 426 of file BLI_bounds.hh.

References any_less_than(), any_less_than_v(), b, and T.

Referenced by any_less_than(), and blender::Bounds< T >::contains().

◆ any_less_than_v()

template<typename T, int Size>
bool blender::bounds::detail::any_less_than_v ( const VecBase< T, Size > & a,
const VecBase< T, Size > & b )
inlinenodiscard

Definition at line 393 of file BLI_bounds.hh.

References any_less_than_v(), and b.

Referenced by any_less_than(), and any_less_than_v().

◆ min_max_lanes()

template<typename T>
Bounds< T > blender::bounds::detail::min_max_lanes ( const Span< T > values)
inlinenodiscard

Find the smallest and largest values element-wise in a non-empty span, in one sequential pass. Several accumulators ("lanes"), so that the comparisons of one point do not wait on those of the point before it.

Definition at line 72 of file BLI_bounds.hh.

References min_max_lanes().

Referenced by min_max_lanes().

◆ min_max_lanes_with_radii()

template<typename T, typename RadiusT>
Bounds< T > blender::bounds::detail::min_max_lanes_with_radii ( const Span< T > values,
const Span< RadiusT > radii )
inlinenodiscard

min_max_lanes with a radius added to each value first.

Definition at line 105 of file BLI_bounds.hh.

References blender::math::max(), blender::math::min(), min_max_lanes_with_radii(), blender::result, blender::Span< T >::size(), and T.

Referenced by min_max_lanes_with_radii().

◆ rational_greater_than()

template<typename T>
bool blender::bounds::detail::rational_greater_than ( const T & p1,
const T & q1,
const T & p2,
const T & q2 )
inlinenodiscard

Returns true if (p1 / q1) > (p2 / q2).

Definition at line 465 of file BLI_bounds.hh.

References blender::BLI_assert(), rational_greater_than(), and T.

Referenced by rational_greater_than(), and segment_enter_exit_bounds().

◆ rational_less_than()

template<typename T>
bool blender::bounds::detail::rational_less_than ( const T & p1,
const T & q1,
const T & p2,
const T & q2 )
inlinenodiscard

Returns true if (p1 / q1) < (p2 / q2).

Definition at line 472 of file BLI_bounds.hh.

References blender::BLI_assert(), rational_less_than(), and T.

Referenced by rational_less_than(), and segment_enter_exit_bounds().

◆ segment_bounds()

template<typename T>
Bounds< T > blender::bounds::detail::segment_bounds ( const T & start,
const T & end )
inlinenodiscard

◆ segment_enter_exit_bounds()

template<typename T, int Size>
bool blender::bounds::detail::segment_enter_exit_bounds ( const Bounds< VecBase< T, Size > > & bounds,
const VecBase< T, Size > & start,
const VecBase< T, Size > & end )
inlinenodiscard

Adaptation of Liang-Barsky for N dimensions.

Definition at line 480 of file BLI_bounds.hh.

References rational_greater_than(), rational_less_than(), segment_enter_exit_bounds(), and T.

Referenced by blender::Bounds< T >::intersects_segment(), and segment_enter_exit_bounds().