Blender  V3.3
Classes | Functions
blender::bounds Namespace Reference

Classes

struct  MinMaxResult
 

Functions

template<typename T >
static std::optional< MinMaxResult< T > > min_max (Span< T > values)
 
template<typename T , typename RadiusT >
static std::optional< MinMaxResult< T > > min_max_with_radii (Span< T > values, Span< RadiusT > radii)
 

Function Documentation

◆ min_max()

template<typename T >
static std::optional<MinMaxResult<T> > blender::bounds::min_max ( Span< T values)
static

◆ min_max_with_radii()

template<typename T , typename RadiusT >
static std::optional<MinMaxResult<T> > blender::bounds::min_max_with_radii ( Span< T values,
Span< RadiusT >  radii 
)
static

Find the smallest and largest values element-wise in the span, adding the radius to each element first. The template type T is expected to have an addition operator implemented with RadiusT.

Definition at line 53 of file BLI_bounds.hh.

References BLI_assert, blender::Span< T >::first(), blender::Span< T >::index_range(), init, blender::Span< T >::is_empty(), blender::threading::parallel_reduce(), radii, result, and blender::Span< T >::size().

Referenced by blender::bke::curves_bounds(), point_cloud_bounds(), and blender::tests::TEST().