17#include "testing/testing.h"
21using namespace blender::bke;
30 const int curves_num = offsets.
size() - 1;
31 const int points_num = offsets.
last();
33 curves.resize(points_num, curves_num);
34 curves.offsets_for_write().copy_from(offsets);
35 curves.update_curve_types();
39 curves.attributes_for_write().lookup_or_add_for_write_span<
int>(
42 test_indices_writer.
finish();
55 auto instances = std::make_unique<Instances>(2);
59 instances->reference_handles_for_write().fill(handle);
62 instances->attributes_for_write().add<
float>(
67 options.realize_instance_attributes =
true;
Low-level operations for curves.
constexpr int64_t size() const
constexpr const T & last(const int64_t n=0) const
constexpr bool is_empty() const
CCL_NAMESPACE_BEGIN struct Options options
void fill_index_range(MutableSpan< T > span, const T start=0)
TEST_F(MergeCurvesTest, NoConnections)
static bke::CurvesGeometry create_test_curves(Span< int > offsets, Span< bool > cyclic)
RealizeInstancesResult realize_instances(bke::GeometrySet geometry_set, const RealizeInstancesOptions &options)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void * BKE_id_new_nomain(short type, const char *name)
static MatBase identity()
AttributeInitDefaultValue()
MutableVArraySpan< T > span
static GeometrySet from_curves(Curves *curves, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
static GeometrySet from_instances(std::unique_ptr< Instances > instances)
bke::GeometrySet geometry