29 {
SOCK_VECTOR,
N_(
"A"), 0.0f, 0.0f, 0.0f, 0.0f, -FLT_MAX, FLT_MAX},
31 {
SOCK_VECTOR,
N_(
"B"), 0.0f, 0.0f, 0.0f, 0.0f, -FLT_MAX, FLT_MAX},
32 {
SOCK_FLOAT,
N_(
"B"), 0.0f, 0.0f, 0.0f, 0.0f, -FLT_MAX, FLT_MAX},
34 {
SOCK_VECTOR,
N_(
"C"), 0.0f, 0.0f, 0.0f, 0.0f, -FLT_MAX, FLT_MAX},
35 {
SOCK_FLOAT,
N_(
"C"), 0.0f, 0.0f, 0.0f, 0.0f, -FLT_MAX, FLT_MAX},
47 return !
ELEM(operation,
73 uiItemR(layout,
ptr,
"operation", 0,
"", ICON_NONE);
176 const int size = input_a.size();
186 const float3 b = span_b[i];
187 const float3 out = math_function(
a, b);
188 span_result[i] = out;
205 const int size = input_a.size();
216 const float3 b = span_b[i];
218 const float3 out = math_function(
a, b,
c);
219 span_result[i] = out;
236 const int size = input_a.size();
247 const float3 b = span_b[i];
248 const float c = span_c[i];
249 const float3 out = math_function(
a, b,
c);
250 span_result[i] = out;
266 const int size = input_a.size();
276 const float3 b = span_b[i];
277 const float out = math_function(
a, b);
278 span_result[i] = out;
294 const int size = input_a.size();
304 const float b = span_b[i];
305 const float3 out = math_function(
a, b);
306 span_result[i] = out;
321 const int size = input_a.size();
329 const float3 in = span_a[i];
330 const float3 out = math_function(in);
331 span_result[i] = out;
346 const int size = input_a.size();
354 const float3 in = span_a[i];
355 const float out = math_function(in);
356 span_result[i] = out;
374 if (result_attribute) {
375 return result_attribute->domain();
395 const std::string result_name =
params.get_input<std::string>(
"Result");
410 "A",
component, result_domain, read_type_a,
nullptr);
417 attribute_b =
params.get_input_attribute(
"B",
component, result_domain, read_type_b,
nullptr);
423 attribute_c =
params.get_input_attribute(
"C",
component, result_domain, read_type_c,
nullptr);
431 result_name, result_domain, result_type);
432 if (!attribute_result) {
473 *attribute_a, *attribute_b, *attribute_c, *attribute_result, operation);
477 *attribute_a, *attribute_b, *attribute_c, *attribute_result, operation);
480 attribute_result.
save();
497 params.set_output(
"Geometry", geometry_set);
void node_type_socket_templates(struct bNodeType *ntype, struct bNodeSocketTemplate *inputs, struct bNodeSocketTemplate *outputs)
void node_type_update(struct bNodeType *ntype, void(*updatefunc)(struct bNodeTree *ntree, struct bNode *node))
void node_type_init(struct bNodeType *ntype, void(*initfunc)(struct bNodeTree *ntree, struct bNode *node))
void node_type_storage(struct bNodeType *ntype, const char *storagename, void(*freefunc)(struct bNode *node), void(*copyfunc)(struct bNodeTree *dest_ntree, struct bNode *dest_node, const struct bNode *src_node))
#define NODE_CLASS_ATTRIBUTE
void nodeRegisterType(struct bNodeType *ntype)
#define UNUSED_VARS_NDEBUG(...)
static uint8 component(Color32 c, uint i)
@ NODE_VECTOR_MATH_NORMALIZE
@ NODE_VECTOR_MATH_LENGTH
@ NODE_VECTOR_MATH_CROSS_PRODUCT
@ NODE_VECTOR_MATH_MODULO
@ NODE_VECTOR_MATH_COSINE
@ NODE_VECTOR_MATH_REFLECT
@ NODE_VECTOR_MATH_REFRACT
@ NODE_VECTOR_MATH_DOT_PRODUCT
@ NODE_VECTOR_MATH_ABSOLUTE
@ NODE_VECTOR_MATH_DIVIDE
@ NODE_VECTOR_MATH_TANGENT
@ NODE_VECTOR_MATH_DISTANCE
@ NODE_VECTOR_MATH_FRACTION
@ NODE_VECTOR_MATH_PROJECT
@ NODE_VECTOR_MATH_MULTIPLY
@ NODE_VECTOR_MATH_MAXIMUM
@ NODE_VECTOR_MATH_FACEFORWARD
@ NODE_VECTOR_MATH_SUBTRACT
@ NODE_VECTOR_MATH_MINIMUM
GeometryNodeAttributeInputMode
@ GEO_NODE_ATTRIBUTE_INPUT_ATTRIBUTE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie Ellipse Bokeh View Corner Anti Mix RGB Hue Separate TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC Boolean Random Edge Subdivision Point Object Attribute Attribute Attribute Color Attribute GEO_NODE_ATTRIBUTE_VECTOR_MATH
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
static std::string default_domain
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void *(* MEM_callocN)(size_t len, const char *str)
TypedWriteAttribute< float3 > Float3WriteAttribute
TypedReadAttribute< float > FloatReadAttribute
TypedReadAttribute< float3 > Float3ReadAttribute
GeometrySet geometry_set_realize_instances(const GeometrySet &geometry_set)
TypedWriteAttribute< float > FloatWriteAttribute
std::unique_ptr< ReadAttribute > ReadAttributePtr
static void do_math_operation_fl3_fl3_to_fl3(const Float3ReadAttribute &input_a, const Float3ReadAttribute &input_b, Float3WriteAttribute result, const NodeVectorMathOperation operation)
bool try_dispatch_float_math_fl3_fl3_to_fl3(const NodeVectorMathOperation operation, Callback &&callback)
static void do_math_operation_fl3_to_fl(const Float3ReadAttribute &input_a, FloatWriteAttribute result, const NodeVectorMathOperation operation)
static void geo_node_attribute_vector_math_exec(GeoNodeExecParams params)
bool try_dispatch_float_math_fl3_to_fl(const NodeVectorMathOperation operation, Callback &&callback)
static void attribute_vector_math_calc(GeometryComponent &component, const GeoNodeExecParams ¶ms)
static void do_math_operation_fl3_to_fl3(const Float3ReadAttribute &input_a, Float3WriteAttribute result, const NodeVectorMathOperation operation)
void update_attribute_input_socket_availabilities(bNode &node, const StringRef name, const GeometryNodeAttributeInputMode mode, const bool name_is_available)
bool try_dispatch_float_math_fl3_fl3_to_fl(const NodeVectorMathOperation operation, Callback &&callback)
static void do_math_operation_fl3_fl3_to_fl(const Float3ReadAttribute &input_a, const Float3ReadAttribute &input_b, FloatWriteAttribute result, const NodeVectorMathOperation operation)
bool try_dispatch_float_math_fl3_fl_to_fl3(const NodeVectorMathOperation operation, Callback &&callback)
static AttributeDomain get_result_domain(const GeometryComponent &component, StringRef source_name, StringRef result_name)
bool try_dispatch_float_math_fl3_fl3_fl_to_fl3(const NodeVectorMathOperation operation, Callback &&callback)
bool try_dispatch_float_math_fl3_to_fl3(const NodeVectorMathOperation operation, Callback &&callback)
static void do_math_operation_fl3_fl3_fl_to_fl3(const Float3ReadAttribute &input_a, const Float3ReadAttribute &input_b, const FloatReadAttribute &input_c, Float3WriteAttribute result, const NodeVectorMathOperation operation)
bool try_dispatch_float_math_fl3_fl3_fl3_to_fl3(const NodeVectorMathOperation operation, Callback &&callback)
static void geo_node_attribute_vector_math_update(bNodeTree *UNUSED(ntree), bNode *node)
static void do_math_operation_fl3_fl3_fl3_to_fl3(const Float3ReadAttribute &input_a, const Float3ReadAttribute &input_b, const Float3ReadAttribute &input_c, Float3WriteAttribute result, const NodeVectorMathOperation operation)
static void do_math_operation_fl3_fl_to_fl3(const Float3ReadAttribute &input_a, const FloatReadAttribute &input_b, Float3WriteAttribute result, const NodeVectorMathOperation operation)
static bNodeSocketTemplate geo_node_attribute_vector_math_out[]
static CustomDataType operation_get_read_type_b(const NodeVectorMathOperation operation)
static bool operation_use_input_c(const NodeVectorMathOperation operation)
static bNodeSocketTemplate geo_node_attribute_vector_math_in[]
static void geo_node_attribute_vector_math_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static void geo_node_attribute_vector_math_init(bNodeTree *UNUSED(tree), bNode *node)
static bool operation_use_input_b(const NodeVectorMathOperation operation)
static CustomDataType operation_get_result_type(const NodeVectorMathOperation operation)
void register_node_type_geo_attribute_vector_math()
static CustomDataType operation_get_read_type_c(const NodeVectorMathOperation operation)
void geo_node_type_base(bNodeType *ntype, int type, const char *name, short nclass, short flag)
void node_copy_standard_storage(bNodeTree *UNUSED(dest_ntree), bNode *dest_node, const bNode *src_node)
void node_free_standard_storage(bNode *node)
GeometryComponent & get_component_for_write(GeometryComponentType component_type)
bool has(const GeometryComponentType component_type) const
Compact definition of a node socket.
NodeGeometryExecFunction geometry_node_execute
void(* draw_buttons)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)