21 b.add_input<
decl::Bool>(
"Local Space").default_value(
true).field_on_all();
45 const float3 pivot = pivots[i];
47 float4x4 &instance_transform = transforms[i];
52 if (local_spaces[i]) {
65 rotation_matrix =
float4x4(rotation_z * rotation_y * rotation_x);
75 instance_transform.location() -= used_pivot;
77 instance_transform = rotation_matrix * instance_transform;
79 instance_transform.location() += used_pivot;
89 params.set_output(
"Instances", std::move(geometry_set));
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_ROTATE_INSTANCES
#define NOD_REGISTER_NODE(REGISTER_FUNC)
SIMD_FORCE_INLINE btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
int instances_num() const
MutableSpan< float4x4 > transforms_for_write()
void set_selection(Field< bool > selection)
int add(GField field, GVArray *varray_ptr)
IndexMask get_evaluated_selection_as_mask() const
const GVArray & get_evaluated(const int field_index) const
local_group_size(16, 16) .push_constant(Type b
void node_register_type(bNodeType *ntype)
QuaternionBase< float > Quaternion
AxisAngleBase< float, AngleRadianBase< float > > AxisAngle
EulerXYZBase< float > EulerXYZ
MatT from_rotation(const RotationT &rotation)
Euler3Base< T > to_euler(const AxisAngleBase< T, AngleT > &axis_angle, EulerOrder order)
static void node_geo_exec(GeoNodeExecParams params)
static void rotate_instances(GeoNodeExecParams ¶ms, bke::Instances &instances)
static void node_declare(NodeDeclarationBuilder &b)
static void node_register()
MatBase< float, 4, 4 > float4x4
MatBase< float, 3, 3 > float3x3
VecBase< float, 3 > float3
void geo_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
GPU_SHADER_INTERFACE_INFO(overlay_edit_curve_handle_iface, "vert").flat(Type pos vertex_in(1, Type::UINT, "data") .vertex_out(overlay_edit_curve_handle_iface) .geometry_layout(PrimitiveIn Frequency::GEOMETRY storage_buf(1, Qualifier::READ, "uint", "data[]", Frequency::GEOMETRY) .push_constant(Type Frequency::GEOMETRY selection[]
Instances * get_instances_for_write()
NodeGeometryExecFunction geometry_node_execute
NodeDeclareFunction declare