37 const IndexMask selection = evaluator.get_evaluated_selection_as_mask();
40 const VArray<bool> local_spaces = evaluator.get_evaluated<
bool>(2);
45 const float3 pivot = pivots[i];
47 float4x4 &instance_transform = transforms[i];
52 if (local_spaces[i]) {
57 const float3x3 rotation_x = from_rotation<float3x3>(
59 const float3x3 rotation_y = from_rotation<float3x3>(
61 const float3x3 rotation_z = from_rotation<float3x3>(
65 rotation_matrix =
float4x4(rotation_z * rotation_y * rotation_x);
72 rotation_matrix = from_rotation<float4x4>(rotation);
75 instance_transform.location() -= used_pivot;
77 instance_transform = rotation_matrix * instance_transform;
79 instance_transform.location() += used_pivot;