15 .
description(
"The corner to retrieve data from. Defaults to the corner from the context")
16 .structure_type(StructureType::Field);
18 .structure_type(StructureType::Field)
20 "The number of corners to move around the face before finding the result, "
21 "circling around the start of the face if necessary");
23 .structure_type(StructureType::Field)
24 .propagate_references()
35 corner_index_(std::move(corner_index)),
36 offset_(std::move(offset))
49 evaluator.
add(corner_index_);
50 evaluator.
add(offset_);
58 mask.foreach_index_optimized<
int>(
59 [&](
const int selection_i) {
60 const int corner = corner_indices[selection_i];
61 const int offset = offsets[selection_i];
62 if (!corner_to_face.index_range().contains(corner)) {
63 offset_corners[selection_i] = 0;
66 const IndexRange face = faces[corner_to_face[corner]];
67 const int corner_index_in_face = corner - face.
start();
68 offset_corners[selection_i] = face.
start() +
85 static constexpr int8_t id = 0;
87 hash.add(deep_hash_cache.ensure(corner_index_));
88 hash.add(deep_hash_cache.ensure(offset_));
93 return AttrDomain::Corner;
110 ntype.
ui_name =
"Offset Corner in Face";
111 ntype.
ui_description =
"Retrieve corners in the same face as another";
#define GEO_NODE_MESH_TOPOLOGY_OFFSET_CORNER_IN_FACE
#define NOD_REGISTER_NODE(REGISTER_FUNC)
constexpr int64_t size() const
constexpr int64_t start() const
static VArray from_container(ContainerT container)
int add(GField field, GVArray *varray_ptr)
const GVArray & get_evaluated(const int field_index) const
static Field from_input(Args &&...args)
T extract_input(const UString identifier)
void set_output(const UString identifier, T &&value)
void node_register_type(bNodeType &ntype)
constexpr ParallelGrainSize grain_size(int grain_size)
T mod_periodic(const T &a, const T &b)
static void node_declare(NodeDeclarationBuilder &b)
static void node_register()
static void node_geo_exec(GeoNodeExecParams params)
@ NODE_DEFAULT_INPUT_INDEX_FIELD
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
static constexpr int _160
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
NodeDeclareFunction declare