19#include "testing/testing.h"
42 const int curves_num = offsets.
size() - 1;
43 const int points_num = offsets.
last();
45 curves.resize(points_num, curves_num);
46 curves.offsets_for_write().copy_from(offsets);
47 curves.update_curve_types();
51 curves.attributes_for_write().lookup_or_add_for_write_span<
int>(
54 test_indices_writer.
finish();
79 options.realize_instance_attributes =
true;
Low-level operations for curves.
void * BKE_id_new_nomain(short type, const char *name)
constexpr int64_t size() const
constexpr const T & last(const int64_t n=0) const
constexpr bool is_empty() const
int add_reference(const InstanceReference &reference)
void add_instance(int instance_handle, const float4x4 &transform)
bke::MutableAttributeAccessor attributes_for_write()
bool add(const StringRef attribute_id, const AttrDomain domain, const AttrType data_type, const AttributeInit &initializer)
static void SetUpTestSuite()
static void TearDownTestSuite()
CCL_NAMESPACE_BEGIN struct Options options
void fill_index_range(MutableSpan< T > span, const T start=0)
TEST_F(RealizeInstancesTest, InstanceAttributeToBuiltinCurvesAttribute)
static bke::CurvesGeometry create_test_curves(Span< int > offsets, Span< bool > cyclic)
RealizeInstancesResult realize_instances(bke::GeometrySet geometry_set, const RealizeInstancesOptions &options)
static MatBase identity()
MutableVArraySpan< T > span
static GeometrySet from_instances(Instances *instances, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
static GeometrySet from_curves(Curves *curves, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
bke::GeometrySet geometry