Differential D16083 Diff 56395 source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc
| Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | uint64_t hash() const override | ||||
| /* Some random constant hash. */ | /* Some random constant hash. */ | ||||
| return 2356235652; | return 2356235652; | ||||
| } | } | ||||
| bool is_equal_to(const fn::FieldNode &other) const override | bool is_equal_to(const fn::FieldNode &other) const override | ||||
| { | { | ||||
| return dynamic_cast<const PlanarFieldInput *>(&other) != nullptr; | return dynamic_cast<const PlanarFieldInput *>(&other) != nullptr; | ||||
| } | } | ||||
| std::optional<eAttrDomain> preferred_domain(const Mesh & /*mesh*/) const override | |||||
| { | |||||
| return ATTR_DOMAIN_FACE; | |||||
| } | |||||
| }; | }; | ||||
| static void geo_node_exec(GeoNodeExecParams params) | static void geo_node_exec(GeoNodeExecParams params) | ||||
| { | { | ||||
| Field<float> threshold = params.extract_input<Field<float>>("Threshold"); | Field<float> threshold = params.extract_input<Field<float>>("Threshold"); | ||||
| Field<bool> planar_field{std::make_shared<PlanarFieldInput>(threshold)}; | Field<bool> planar_field{std::make_shared<PlanarFieldInput>(threshold)}; | ||||
| params.set_output("Planar", std::move(planar_field)); | params.set_output("Planar", std::move(planar_field)); | ||||
| } | } | ||||
| Show All 15 Lines | |||||