45 class ComponentAttributeProviders;
46 class CurvesEditHints;
60 mutable std::atomic<int> users_ = 1;
74 virtual std::optional<blender::bke::AttributeAccessor>
attributes()
const;
120 std::array<GeometryComponentPtr, GEO_COMPONENT_TYPE_ENUM_SIZE> components_;
155 template<
typename Component>
bool has()
const
158 return this->
has(Component::static_type);
162 template<
typename Component>
void remove()
165 return this->
remove(Component::static_type);
209 bool include_instances,
215 bool include_instances,
219 bool ignore_empty)
const;
350 template<
typename Component> Component *get_component_ptr()
353 return static_cast<Component *
>(get_component_ptr(Component::static_type));
366 Mesh *mesh_ =
nullptr;
404 std::optional<blender::bke::AttributeAccessor>
attributes() const
final;
429 bool has_pointcloud()
const;
459 std::optional<blender::bke::AttributeAccessor>
attributes()
const final;
485 bool has_curve()
const;
500 std::optional<blender::bke::AttributeAccessor>
attributes()
const final;
513 Curves *curves_ =
nullptr;
522 mutable Curve *curve_for_render_ =
nullptr;
531 bool has_curves()
const;
550 const Curve *get_curve_for_render()
const;
552 std::optional<blender::bke::AttributeAccessor>
attributes()
const final;
577 Type type_ = Type::None;
579 void *
data_ =
nullptr;
580 std::unique_ptr<GeometrySet> geometry_set_;
601 if (other.geometry_set_) {
602 geometry_set_ = std::make_unique<GeometrySet>(*other.geometry_set_);
607 : type_(other.type_),
data_(other.
data_), geometry_set_(
std::move(other.geometry_set_))
609 other.type_ = Type::None;
610 other.data_ =
nullptr;
615 if (
this == &other) {
625 if (
this == &other) {
653 return *geometry_set_;
658 if (type_ != Type::GeometrySet) {
662 return geometry_set_->owns_direct_data();
667 if (type_ != Type::GeometrySet) {
670 geometry_set_->ensure_owns_direct_data();
680 return a.data_ ==
b.data_ &&
a.geometry_set_.get() ==
b.geometry_set_.get();
726 void reserve(
int min_capacity);
733 void resize(
int capacity);
749 void remove_unused_references();
756 void ensure_geometry_instances();
762 GeometrySet &geometry_set_from_reference(
int reference_index);
769 int instances_num()
const;
770 int references_num()
const;
783 std::optional<blender::bke::AttributeAccessor>
attributes() const
final;
786 void foreach_referenced_geometry(
806 Volume *volume_ =
nullptr;
815 bool has_volume()
const;
873 static
void remember_deformed_curve_positions_if_necessary(
GeometrySet &geometry);
@ GEO_COMPONENT_TYPE_MESH
@ GEO_COMPONENT_TYPE_POINT_CLOUD
@ GEO_COMPONENT_TYPE_INSTANCES
@ GEO_COMPONENT_TYPE_EDIT
@ GEO_COMPONENT_TYPE_CURVE
@ GEO_COMPONENT_TYPE_VOLUME
constexpr bool is_geometry_component_v
#define BLI_STATIC_ASSERT(a, msg)
static uint8 component(Color32 c, uint i)
struct Collection Collection
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to curves
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
std::unique_ptr< blender::bke::CurvesEditHints > curves_edit_hints_
int attribute_domain_size(eAttrDomain domain) const
virtual bool is_empty() const
virtual void ensure_owns_direct_data()=0
GeometryComponent(GeometryComponentType type)
virtual ~GeometryComponent()=default
static GeometryComponent * create(GeometryComponentType component_type)
virtual std::optional< blender::bke::AttributeAccessor > attributes() const
virtual std::optional< blender::bke::MutableAttributeAccessor > attributes_for_write()
GeometryComponentType type() const
virtual GeometryComponent * copy() const =0
virtual bool owns_direct_data() const =0
InstanceReference(Object &object)
InstanceReference(GeometrySet geometry_set)
InstanceReference(const InstanceReference &other)
InstanceReference & operator=(InstanceReference &&other)
InstanceReference(InstanceReference &&other)
void ensure_owns_direct_data()
InstanceReference(Collection &collection)
friend bool operator==(const InstanceReference &a, const InstanceReference &b)
InstanceReference & operator=(const InstanceReference &other)
InstanceReference()=default
bool owns_direct_data() const
Collection & collection() const
const GeometrySet & geometry_set() const
~InstancesComponent()=default
std::optional< blender::bke::MutableAttributeAccessor > attributes_for_write() final
const Mesh * get_for_read() const
bool is_empty() const final
void replace(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
std::optional< blender::bke::AttributeAccessor > attributes() const final
GeometryComponent * copy() const override
bool owns_direct_data() const override
void ensure_owns_direct_data() override
static constexpr GeometryComponentType static_type
DEGForeachIDComponentCallback callback
SyclQueue void void size_t num_bytes void
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
uint64_t get_default_hash_2(const T1 &v1, const T2 &v2)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
unsigned __int64 uint64_t
const PointCloud * get_pointcloud_for_read() const
void replace_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
static GeometrySet create_with_curves(Curves *curves, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
blender::Vector< const GeometryComponent * > get_components_for_read() const
GeometrySet(GeometrySet &&other)
Curves * get_curves_for_write()
void ensure_owns_direct_data()
const Volume * get_volume_for_read() const
void replace_curves(Curves *curves, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
static GeometrySet create_with_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
void keep_only_during_modify(const blender::Span< GeometryComponentType > component_types)
GeometrySet & operator=(const GeometrySet &other)
bool has_realized_data() const
blender::Vector< GeometryComponentType > gather_component_types(bool include_instances, bool ignore_empty) const
void replace_volume(Volume *volume, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
static GeometrySet create_with_volume(Volume *volume, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
Component & get_component_for_write()
PointCloud * get_pointcloud_for_write()
const Mesh * get_mesh_for_read() const
bool owns_direct_data() const
const Curves * get_curves_for_read() const
void attribute_foreach(blender::Span< GeometryComponentType > component_types, bool include_instances, AttributeForeachCallback callback) const
void gather_attributes_for_propagation(blender::Span< GeometryComponentType > component_types, GeometryComponentType dst_component_type, bool include_instances, blender::Map< blender::bke::AttributeIDRef, blender::bke::AttributeKind > &r_attributes) const
friend std::ostream & operator<<(std::ostream &stream, const GeometrySet &geometry_set)
GeometrySet(const GeometrySet &other)
Mesh * get_mesh_for_write()
void add(const GeometryComponent &component)
bool has_instances() const
void modify_geometry_sets(ForeachSubGeometryCallback callback)
static GeometrySet create_with_pointcloud(PointCloud *pointcloud, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
void keep_only(const blender::Span< GeometryComponentType > component_types)
blender::bke::CurvesEditHints * get_curve_edit_hints_for_write()
const blender::bke::CurvesEditHints * get_curve_edit_hints_for_read() const
Volume * get_volume_for_write()
bool compute_boundbox_without_instances(blender::float3 *r_min, blender::float3 *r_max) const
void remove_geometry_during_modify()
void replace_pointcloud(PointCloud *pointcloud, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
const Component * get_component_for_read() const
GeometrySet & operator=(GeometrySet &&other)
bool has_pointcloud() const