|
Blender V5.3
|
Inherits blender::fn::multi_function::MultiFunction.
Public Member Functions | |
| ProximityFunction (GeometrySet target, GeometryNodeProximityTargetType type, const Field< int > &group_id_field) | |
| ~ProximityFunction () override=default | |
| void | init_for_pointcloud (const PointCloud &pointcloud, const Field< int > &group_id_field) const |
| void | init_for_mesh (const Mesh &mesh, const Field< int > &group_id_field) const |
| bke::AttrDomain | get_domain_on_mesh () const |
| void | call (const IndexMask &mask, mf::Params params, mf::Context) const override |
| ExecutionHints | get_execution_hints () const override |
| void | hash_unique (UniqueHashBytes &hash) const override |
| void | prepare_for_execution () const override |
| Public Member Functions inherited from blender::fn::multi_function::MultiFunction | |
| virtual | ~MultiFunction ()=default |
| void | call_auto (const IndexMask &mask, Params params, Context context) const |
| virtual void | call (const IndexMask &mask, Params params, Context context) const =0 |
| virtual bool | equals (const MultiFunction &other) const |
| int | param_amount () const |
| IndexRange | param_indices () const |
| ParamType | param_type (int param_index) const |
| StringRefNull | param_name (int param_index) const |
| StringRefNull | name () const |
| virtual std::string | debug_name () const |
| const Signature & | signature () const |
| ExecutionHints | execution_hints () const |
Static Public Member Functions | |
| static void | build_group_trees (const VArray< int > &group_ids, const FunctionRef< const bke::bvh::Tree &()> cached_tree, const FunctionRef< bke::bvh::Tree(const IndexMask &)> build_tree, GroupTrees &r_trees) |
Additional Inherited Members | |
| Protected Member Functions inherited from blender::fn::multi_function::MultiFunction | |
| void | set_signature (const Signature *signature) |
Definition at line 71 of file node_geo_proximity.cc.
|
inline |
Definition at line 98 of file node_geo_proximity.cc.
References blender::fn::multi_function::MultiFunction::set_signature(), and blender::fn::multi_function::MultiFunction::signature().
|
overridedefault |
|
inlinestatic |
| cached_tree | The geometry's cached tree, used when a group contains every element. |
| build_tree | Build a tree for the elements in the mask. |
Definition at line 122 of file node_geo_proximity.cc.
References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::IndexMask::from_group_ids(), blender::IndexRange::IndexRange(), blender::threading::individual_task_sizes(), blender::threading::parallel_for(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reserve(), blender::index_mask::IndexMask::size(), blender::VArrayCommon< T >::size(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by init_for_mesh(), and init_for_pointcloud().
|
inlineoverride |
Definition at line 226 of file node_geo_proximity.cc.
References blender::bke::bvh::Tree::closest_point(), blender::math::distance(), FLT_MAX, and blender::result.
|
inline |
Definition at line 212 of file node_geo_proximity.cc.
References BLI_assert_unreachable, blender::bke::Edge, blender::bke::Face, blender::GEO_NODE_PROX_TARGET_EDGES, blender::GEO_NODE_PROX_TARGET_FACES, blender::GEO_NODE_PROX_TARGET_POINTS, and blender::bke::Point.
Referenced by init_for_mesh().
|
inlineoverridevirtual |
Reimplemented from blender::fn::multi_function::MultiFunction.
Definition at line 289 of file node_geo_proximity.cc.
References blender::fn::multi_function::MultiFunction::ExecutionHints::min_grain_size.
|
inlineoverridevirtual |
Reimplemented from blender::fn::multi_function::MultiFunction.
Definition at line 296 of file node_geo_proximity.cc.
References blender::fn::FieldHashDeep::ensure(), and hash.
|
inline |
Definition at line 173 of file node_geo_proximity.cc.
References blender::fn::FieldEvaluator::add(), build_group_trees(), blender::fn::FieldEvaluator::evaluate(), blender::bke::bvh::Tree::from_edges(), blender::bke::bvh::Tree::from_points(), blender::bke::bvh::Tree::from_tris(), blender::GEO_NODE_PROX_TARGET_EDGES, blender::GEO_NODE_PROX_TARGET_FACES, blender::GEO_NODE_PROX_TARGET_POINTS, get_domain_on_mesh(), and blender::fn::FieldEvaluator::get_evaluated().
Referenced by prepare_for_execution().
|
inline |
Definition at line 156 of file node_geo_proximity.cc.
References blender::fn::FieldEvaluator::add(), build_group_trees(), blender::fn::FieldEvaluator::evaluate(), blender::bke::bvh::Tree::from_points(), blender::fn::FieldEvaluator::get_evaluated(), and blender::PointCloud::totpoint.
Referenced by prepare_for_execution().
|
inlineoverridevirtual |
For performance reasons it might make sense to delay construction of data inside the node until we can be sure that the function will be evaluated. This method should be called before execution. The work must be protected by a lock though, since it may be called from multiple threads.
Reimplemented from blender::fn::multi_function::MultiFunction.
Definition at line 307 of file node_geo_proximity.cc.
References blender::GEO_NODE_PROX_TARGET_POINTS, init_for_mesh(), and init_for_pointcloud().