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);
53 test_indices_writer.
finish();
78 options.realize_instance_attributes =
true;
Low-level operations for curves.
void * BKE_id_new_nomain(short type, const char *name)
constexpr void copy_from(Span< T > values) const
constexpr int64_t size() const
constexpr const T & last(const int64_t n=0) const
constexpr bool is_empty() const
MutableAttributeAccessor attributes_for_write()
void resize(int points_num, int curves_num)
MutableSpan< int > offsets_for_write()
int add_reference(const InstanceReference &reference)
void add_instance(int instance_handle, const float4x4 &transform)
bke::MutableAttributeAccessor attributes_for_write()
GSpanAttributeWriter lookup_or_add_for_write_span(StringRef attribute_id, AttrDomain domain, eCustomDataType data_type, const AttributeInit &initializer=AttributeInitDefaultValue())
bool add(const StringRef attribute_id, const AttrDomain domain, const eCustomDataType 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)
bke::GeometrySet realize_instances(bke::GeometrySet geometry_set, const RealizeInstancesOptions &options)
static MatBase identity()
static GeometrySet from_instances(Instances *instances, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
static GeometrySet from_curves(Curves *curves, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
MutableVArraySpan< T > span