Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_raycast.cc
| Show First 20 Lines • Show All 199 Lines • ▼ Show 20 Lines | private: | ||||
| GeometrySet target_; | GeometrySet target_; | ||||
| GeometryNodeRaycastMapMode mapping_; | GeometryNodeRaycastMapMode mapping_; | ||||
| /** The field for data evaluated on the target geometry. */ | /** The field for data evaluated on the target geometry. */ | ||||
| std::optional<GeometryComponentFieldContext> target_context_; | std::optional<GeometryComponentFieldContext> target_context_; | ||||
| std::unique_ptr<FieldEvaluator> target_evaluator_; | std::unique_ptr<FieldEvaluator> target_evaluator_; | ||||
| const GVArray *target_data_ = nullptr; | const GVArray *target_data_ = nullptr; | ||||
| /* Always evaluate the target domain data on the point domain. Eventually this could be | /* Always evaluate the target domain data on the face corner domain because it contains the most | ||||
| * exposed as an option or determined automatically from the field inputs in order to avoid | * information. Eventually this could be exposed as an option or determined automatically from | ||||
| * losing information if the target field is on a different domain. */ | * the field inputs for better performance. */ | ||||
| const AttributeDomain domain_ = ATTR_DOMAIN_POINT; | const AttributeDomain domain_ = ATTR_DOMAIN_CORNER; | ||||
| fn::MFSignature signature_; | fn::MFSignature signature_; | ||||
| public: | public: | ||||
| RaycastFunction(GeometrySet target, GField src_field, GeometryNodeRaycastMapMode mapping) | RaycastFunction(GeometrySet target, GField src_field, GeometryNodeRaycastMapMode mapping) | ||||
| : target_(std::move(target)), mapping_((GeometryNodeRaycastMapMode)mapping) | : target_(std::move(target)), mapping_((GeometryNodeRaycastMapMode)mapping) | ||||
| { | { | ||||
| target_.ensure_owns_direct_data(); | target_.ensure_owns_direct_data(); | ||||
| ▲ Show 20 Lines • Show All 226 Lines • Show Last 20 Lines | |||||