|
Blender V5.3
|
Namespaces | |
| namespace | detail |
Functions | |
| template<typename T> | |
| Bounds< T > | merge (const Bounds< T > &a, const Bounds< T > &b) |
| template<typename T> | |
| std::optional< Bounds< T > > | merge (const std::optional< Bounds< T > > &a, const std::optional< Bounds< T > > &b) |
| template<typename T> | |
| std::optional< Bounds< T > > | merge (const std::optional< Bounds< T > > &a, const Bounds< T > &b) |
| template<typename T> | |
| std::optional< Bounds< T > > | min_max (const std::optional< Bounds< T > > &a, const T &b) |
| template<typename T> | |
| std::optional< Bounds< T > > | min_max (const Span< T > values) |
| template<typename T> | |
| std::optional< Bounds< T > > | min_max (const IndexMask &mask, const Span< T > values) |
| template<typename T, typename RadiusT> | |
| std::optional< Bounds< T > > | min_max_with_radii (const Span< T > values, const Span< RadiusT > radii) |
| template<typename T> | |
| std::optional< Bounds< T > > | min_max (const VArray< T > &varray) |
| template<typename T> | |
| std::optional< Bounds< T > > | intersect (const Bounds< T > &a, const Bounds< T > &b) |
| template<typename T> | |
| std::optional< Bounds< T > > | intersect (const std::optional< Bounds< T > > &a, const std::optional< Bounds< T > > &b) |
| template<typename T> | |
| std::optional< T > | max (const VArray< T > &values) |
| template<typename T> | |
| std::array< VecBase< T, 3 >, 8 > | corners (const Bounds< VecBase< T, 3 > > &bounds) |
| template<typename T> | |
| std::array< VecBase< T, 2 >, 4 > | corners (const Bounds< VecBase< T, 2 > > &bounds) |
| template<typename T, int D> | |
| Bounds< VecBase< T, 3 > > | transform_bounds (const MatBase< T, D, D > &matrix, const Bounds< VecBase< T, 3 > > &bounds) |
| template<typename T, int D> | |
| Bounds< VecBase< T, 2 > > | transform_bounds (const MatBase< T, D, D > &matrix, const Bounds< VecBase< T, 2 > > &bounds) |
|
inline |
Return the four corners of a 2D bounding box.
Y | | .-----X 3----------2 | | | | | | | | 0----------1
Definition at line 343 of file BLI_bounds.hh.
References corners().
|
inline |
Return the eight corners of a 3D bounding box.
Z Y
| /
|/
.-----X
2----------6
/| /|
/ | / |
1----------5 |
| | | |
| 3-------|--7
| / | /
|/ |/
0----------4
Definition at line 311 of file BLI_bounds.hh.
References corners().
Referenced by corners(), corners(), blender::draw::drw_debug_matrix_as_bbox(), blender::draw::View::frustum_boundbox_calc(), blender::ed::transform::gizmo_3d_foreach_selected(), blender::ed::object::lattice_add_to_selected_collect_targets_and_calc_bounds(), blender::lineart_geometry_check_visible(), blender::ed::transform::snap_source_closest_fn(), ObjectBounds::sync(), BlenderObjectCulling::test(), transform_bounds(), transform_bounds(), blender::io::alembic::ABCAbstractWriter::update_bounding_box(), blender::eevee::VolumeObjectBounds::VolumeObjectBounds(), and blender::ed::object::voxel_size_edit_invoke().
|
inlinenodiscard |
Returns a new bound that contains the intersection of the two given bound. Returns no box if there are no overlap.
Definition at line 247 of file BLI_bounds.hh.
References b, intersect(), blender::Bounds< T >::max, blender::math::max(), blender::Bounds< T >::min, blender::math::min(), and blender::result.
Referenced by blender::eevee::VolumeLayer::bounds_overlaps(), blender::ed::greasepencil::trim::check_segments_in_lasso(), blender::nodes::node_composite_crop_cc::CropOperation::compute_cropping_bounds(), blender::ed::greasepencil::segment::find_intersections_between_curve_and_curves(), blender::draw::compositor_engine::Context::get_camera_region(), blender::draw::compositor_engine::Context::get_compositing_domain(), intersect(), intersect(), and blender::Bounds< T >::intersects().
|
inlinenodiscard |
Definition at line 256 of file BLI_bounds.hh.
References b, and intersect().
Finds the maximum value for elements in the array.
Definition at line 268 of file BLI_bounds.hh.
References blender::Default, blender::VArrayCommon< T >::get_if_single(), blender::blender::Span< T >::index_range(), blender::VArrayCommon< T >::is_empty(), max(), blender::threading::parallel_reduce(), and PRF_scope_with_name.
Referenced by blender::bke::CurvesGeometry::material_index_max(), and max().
|
inlinenodiscard |
Definition at line 27 of file BLI_bounds.hh.
Referenced by blender::eevee::VolumeLayer::add_object_bound(), blender::BKE_volume_min_max(), blender::bke::GeometrySet::compute_boundbox_without_instances(), blender::bke::compute_local_mesh_groups(), blender::ed::sculpt_paint::image::do_paint_pixels(), blender::ED_view3d_minmax_verts(), blender::ed::greasepencil::fit_strokes_to_view(), blender::bke::pbvh::Tree::flush_bounds_to_parents(), blender::bke::pbvh::Tree::from_grids(), blender::bke::pbvh::Tree::from_mesh(), blender::io::obj::geometry_to_blender_objects(), blender::ed::greasepencil::get_boundary_bounds(), blender::seq::image_transform_bounding_box_from_strips_get(), merge(), merge(), merge(), blender::bke::merge_bounds(), blender::bke::pbvh::merge_bounds(), blender::ed::space_node::node_bounds(), blender::bke::pbvh::pbvh_bmesh_node_split(), blender::eevee::VolumePipeline::register_and_get_layer(), blender::io::grease_pencil::shift_to_bounds_center(), and blender::CurvesPointSelectionStatus::sum().
|
inlinenodiscard |
Definition at line 49 of file BLI_bounds.hh.
|
inlinenodiscard |
Definition at line 33 of file BLI_bounds.hh.
|
inlinenodiscard |
Definition at line 160 of file BLI_bounds.hh.
References blender::Default, blender::bke::subdiv::init(), blender::Span< T >::is_empty(), min_max(), blender::threading::parallel_reduce(), PRF_scope_with_name, blender::result, and blender::Span< T >::size().
|
inlinenodiscard |
Find the smallest and largest values element-wise in the span.
Definition at line 142 of file BLI_bounds.hh.
References b, blender::Default, blender::Span< T >::first(), blender::Span< T >::index_range(), blender::bke::subdiv::init(), blender::Span< T >::is_empty(), min_max(), blender::threading::parallel_reduce(), and PRF_scope_with_name.
|
inlinenodiscard |
Definition at line 56 of file BLI_bounds.hh.
References b, min_max(), and T.
Referenced by blender::BKE_editmesh_cache_calc_minmax(), blender::bke::CurvesGeometry::bounds_min_max(), blender::ed::greasepencil::trim::check_segments_in_lasso(), blender::ed::greasepencil::tests::draw_results(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::nodes::node_geo_string_to_curves_cc::get_pivot_point(), blender::ed::greasepencil::get_selected_frame_number_bounds(), blender::ed::sculpt_paint::grease_pencil_erase_lasso_exec(), blender::array_utils::group_ids_to_indices(), blender::seq::image_transform_bounding_box_from_strips_get(), min_max(), min_max(), min_max(), min_max(), blender::ed::space_node::node_draw_zones_and_frames(), blender::ed::space_node::node_location_bounds(), blender::ed::sculpt_paint::greasepencil::CloneOperation::on_stroke_begin(), blender::geometry::ReverseUVSampler::ReverseUVSampler(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), and blender::eevee::VolumeObjectBounds::VolumeObjectBounds().
|
inlinenodiscard |
Find the smallest and largest values element-wise in a virtual array.
Definition at line 212 of file BLI_bounds.hh.
References blender::Bounds< T >::Bounds(), blender::VArrayCommon< T >::common_info(), blender::CommonVArrayInfo::data, blender::Default, blender::VArrayCommon< T >::first(), blender::VArrayCommon< T >::index_range(), blender::bke::subdiv::init(), blender::VArrayCommon< T >::is_empty(), min_max(), blender::threading::parallel_reduce(), PRF_scope_with_name, blender::result, blender::CommonVArrayInfo::Single, blender::VArrayCommon< T >::size(), blender::CommonVArrayInfo::Span, T, and blender::CommonVArrayInfo::type.
|
inlinenodiscard |
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 189 of file BLI_bounds.hh.
References b, blender::BLI_assert(), blender::Default, blender::Span< T >::first(), blender::Span< T >::index_range(), blender::bke::subdiv::init(), blender::Span< T >::is_empty(), min_max_with_radii(), blender::threading::parallel_reduce(), PRF_scope_with_name, and blender::Span< T >::size().
Referenced by blender::bke::CurvesGeometry::bounds_min_max(), min_max_with_radii(), and blender::tests::TEST().
|
inline |
Transform a 2D bounding box.
See the note on the 3D variant.
Definition at line 380 of file BLI_bounds.hh.
References corners(), blender::math::max(), blender::math::min(), Span< T >::Span(), transform_bounds(), and blender::math::transform_point().
|
inline |
Transform a 3D bounding box.
Note: this necessarily grows the bounding box, to ensure that the transformed bounding box fully contains the original. Therefore, calling this iteratively to transform from space A to space B, and then from space B to space C, etc., will also iteratively grow the bounding box on each call. Try to avoid doing that, and instead first compose the transform matrices and then use that to transform the bounding box.
Definition at line 364 of file BLI_bounds.hh.
References corners(), blender::math::max(), blender::math::min(), Span< T >::Span(), transform_bounds(), and blender::math::transform_point().
Referenced by blender::BKE_object_minmax_dupli(), blender::BKE_pchan_minmax(), blender::compositor::Domain::realize_transformation(), transform_bounds(), transform_bounds(), and blender::view3d_calc_minmax_selected().