Blender V5.3
blender::bke::bvh::Tree::UserGeometryData Struct Reference

#include <BKE_bvh.hh>

Public Member Functions

int element (const uint32_t prim_id) const

Public Attributes

Span< float3 > positions
Span< int2 > edges
Span< int > index_map

Detailed Description

Geometry data referenced by the Embree user geometry used for #ElemType::Points and #ElemType::Edges. The data is not copied, so the geometry it comes from must outlive the tree. That is already required elsewhere, since the tree is invalidated whenever positions change.

Definition at line 92 of file BKE_bvh.hh.

Member Function Documentation

◆ element()

int blender::bke::bvh::Tree::UserGeometryData::element ( const uint32_t prim_id) const
inline

The index of the element referenced by an Embree primitive.

Definition at line 100 of file BKE_bvh.hh.

References index_map, and blender::Span< T >::is_empty().

Member Data Documentation

◆ edges

Span<int2> blender::bke::bvh::Tree::UserGeometryData::edges

Only used for #ElemType::Edges.

Definition at line 95 of file BKE_bvh.hh.

◆ index_map

Span<int> blender::bke::bvh::Tree::UserGeometryData::index_map

Maps primitives to elements. Empty when the tree contains every element.

Definition at line 97 of file BKE_bvh.hh.

Referenced by element().

◆ positions

Span<float3> blender::bke::bvh::Tree::UserGeometryData::positions

Definition at line 93 of file BKE_bvh.hh.


The documentation for this struct was generated from the following file: