Blender V5.3
blender::detail Namespace Reference

Classes

struct  AnyDerivedExtraInfo
struct  DeDuplicateParams
struct  NormalizedIntVec
struct  NormalizedIntVec< T, 2, SizeX, SizeY >
struct  NormalizedIntVec< T, 4, SizeX, SizeY, SizeZ, SizeW >
struct  StackChunk
struct  UStringEntry

Functions

template<typename T, CPPTypeFlags FLAGS>
void register_cpp_type (const StringRef type_name)
template<typename CoordT>
KDTreeCoordTraits< CoordT >::ValueType axis_get (const CoordT &co, uint axis)
template<typename CoordT>
KDTreeCoordTraits< CoordT >::ValueType distance_squared (const CoordT &a, const CoordT &b)
template<>
float distance_squared< float > (const float &a, const float &b)
template<typename CoordT>
static uint kdtree_balance (KDTreeNode< CoordT > *nodes, uint nodes_len, uint axis, const uint ofs)
template<typename CoordT>
static void nearest_ordered_insert (KDTreeNearest< CoordT > *nearest, uint *nearest_len, const uint nearest_len_capacity, const int index, const typename KDTree< CoordT >::ValueType dist, const CoordT &co)
template<typename CoordT>
static int nearest_cmp_dist (const void *a, const void *b)
template<typename CoordT>
static void nearest_add_in_range (KDTreeNearest< CoordT > **r_nearest, uint nearest_index, uint *nearest_len_capacity, const int index, const typename KDTree< CoordT >::ValueType dist, const CoordT &co)
template<typename CoordT>
static Vector< int > kdtree_order (const KDTree< CoordT > *tree)
template<typename T, int A_NumCol, int A_NumRow, int B_NumCol, int B_NumRow, typename MatA, typename MatB>
MatBase< T, B_NumCol, A_NumRow > matrix_mul_impl (const MatA &a, const MatB &b)
const blender::detail::UStringEntry & ustring_ensure_entry (StringRef str)
const blender::detail::UStringEntry & ustring_ensure_entry (const char *str)
constexpr auto tie (const VkImageCreateInfo &info)
kdtree_calc_duplicates_fast
template<typename CoordT>
static void deduplicate_recursive (const DeDuplicateParams< CoordT > *p, uint i)

Variables

template<typename T>
TypedBuffer< CPPType > cpp_type_impl {}
template<typename T>
bool is_cpp_type_registered = false
constexpr int kd_stack_init = 100
constexpr int kd_near_alloc_inc = 100
constexpr int kd_found_alloc_inc = 50
constexpr uint kd_node_unset = (uint(-1))
constexpr uint kd_node_root_is_init = (uint(-2))
template<typename T, T Value, size_t... I>
ValueSequence< T,((I==0) ? Value :Value)... > make_value_sequence_impl (std::index_sequence< I... >)
template<typename T, T Value1, T Value2, size_t... Value1Indices, size_t... I>
ValueSequence< T,(ValueSequence< size_t, Value1Indices... >::template contains< I >() ? Value1 :Value2)... > make_two_value_sequence_impl (ValueSequence< size_t, Value1Indices... >, std::index_sequence< I... >)

Function Documentation

◆ axis_get()

◆ deduplicate_recursive()

◆ distance_squared()

template<typename CoordT>
KDTreeCoordTraits< CoordT >::ValueType blender::detail::distance_squared ( const CoordT & a,
const CoordT & b )
inline

◆ distance_squared< float >()

template<>
float blender::detail::distance_squared< float > ( const float & a,
const float & b )
inline

Definition at line 53 of file BLI_kdtree.hh.

References b, and distance_squared().

◆ kdtree_balance()

template<typename CoordT>
uint blender::detail::kdtree_balance ( KDTreeNode< CoordT > * nodes,
uint nodes_len,
uint axis,
const uint ofs )
static

◆ kdtree_order()

template<typename CoordT>
Vector< int > blender::detail::kdtree_order ( const KDTree< CoordT > * tree)
static

Use when we want to loop over nodes ordered by index. Requires indices to be aligned with nodes.

Definition at line 645 of file BLI_kdtree.hh.

References kdtree_order(), blender::KDTree< CoordT >::max_node_index, blender::KDTree< CoordT >::nodes, and blender::KDTree< CoordT >::nodes_len.

Referenced by blender::kdtree_calc_duplicates_fast(), and kdtree_order().

◆ matrix_mul_impl()

template<typename T, int A_NumCol, int A_NumRow, int B_NumCol, int B_NumRow, typename MatA, typename MatB>
MatBase< T, B_NumCol, A_NumRow > blender::detail::matrix_mul_impl ( const MatA & a,
const MatB & b )

Multiply two matrices using matrix multiplication.

Definition at line 912 of file BLI_math_matrix_types.hh.

References b, matrix_mul_impl(), blender::result, and blender::unroll().

Referenced by matrix_mul_impl(), blender::operator*(), blender::operator*(), blender::operator*(), and blender::operator*().

◆ nearest_add_in_range()

template<typename CoordT>
void blender::detail::nearest_add_in_range ( KDTreeNearest< CoordT > ** r_nearest,
uint nearest_index,
uint * nearest_len_capacity,
const int index,
const typename KDTree< CoordT >::ValueType dist,
const CoordT & co )
static

◆ nearest_cmp_dist()

template<typename CoordT>
int blender::detail::nearest_cmp_dist ( const void * a,
const void * b )
static

◆ nearest_ordered_insert()

template<typename CoordT>
void blender::detail::nearest_ordered_insert ( KDTreeNearest< CoordT > * nearest,
uint * nearest_len,
const uint nearest_len_capacity,
const int index,
const typename KDTree< CoordT >::ValueType dist,
const CoordT & co )
static

◆ register_cpp_type()

template<typename T, CPPTypeFlags FLAGS>
void blender::detail::register_cpp_type ( const StringRef type_name)
inline

◆ tie()

auto blender::detail::tie ( const VkImageCreateInfo & info)
constexpr

◆ ustring_ensure_entry() [1/2]

const blender::detail::UStringEntry & blender::detail::ustring_ensure_entry ( const char * str)

Definition at line 49 of file ustring.cc.

References str, blender::StringRef::StringRef(), and ustring_ensure_entry().

◆ ustring_ensure_entry() [2/2]

Variable Documentation

◆ cpp_type_impl

template<typename T>
TypedBuffer<CPPType> blender::detail::cpp_type_impl {}
inline

Global static variable that contains the CPPType for a given type after it has been registered with BLI_CPP_TYPE_REGISTER. This should generally be accessed through #CPPType::get<T>.

Definition at line 450 of file BLI_cpp_type.hh.

Referenced by blender::CPPType::get(), blender::CPPType::get_pre_register(), and register_cpp_type().

◆ is_cpp_type_registered

template<typename T>
bool blender::detail::is_cpp_type_registered = false
inline

Definition at line 451 of file BLI_cpp_type.hh.

Referenced by blender::CPPType::get(), and register_cpp_type().

◆ kd_found_alloc_inc

int blender::detail::kd_found_alloc_inc = 50
constexpr

Definition at line 31 of file BLI_kdtree.hh.

Referenced by nearest_add_in_range().

◆ kd_near_alloc_inc

int blender::detail::kd_near_alloc_inc = 100
constexpr

Definition at line 30 of file BLI_kdtree.hh.

◆ kd_node_root_is_init

uint blender::detail::kd_node_root_is_init = (uint(-2))
constexpr

When set we know all values are unbalanced, otherwise clear them when re-balancing: see #62210.

Definition at line 39 of file BLI_kdtree.hh.

Referenced by blender::kdtree_balance(), and blender::kdtree_new().

◆ kd_node_unset

◆ kd_stack_init

int blender::detail::kd_stack_init = 100
constexpr

Definition at line 29 of file BLI_kdtree.hh.

◆ make_two_value_sequence_impl

template<typename T, T Value1, T Value2, size_t... Value1Indices, size_t... I>
ValueSequence< T,(ValueSequence< size_t, Value1Indices... >::template contains< I >() ? Value1 :Value2)... > blender::detail::make_two_value_sequence_impl(ValueSequence< size_t, Value1Indices... >, std::index_sequence< I... >) ( ValueSequence< size_t, Value1Indices... > ,
std::index_sequence< I... >  )
inline

Definition at line 98 of file BLI_parameter_pack_utils.hh.

◆ make_value_sequence_impl

template<typename T, T Value, size_t... I>
ValueSequence< T,((I==0) ? Value :Value)... > blender::detail::make_value_sequence_impl(std::index_sequence< I... >) ( std::index_sequence< I... > )
inline

Definition at line 88 of file BLI_parameter_pack_utils.hh.