Blender
V3.3
|
#include <BKE_geometry_set.hh>
Public Member Functions | |
Geometry Component Implementation | |
PointCloudComponent () | |
~PointCloudComponent () | |
GeometryComponent * | copy () const override |
void | clear () |
bool | has_pointcloud () const |
void | replace (PointCloud *pointcloud, GeometryOwnershipType ownership=GeometryOwnershipType::Owned) |
PointCloud * | release () |
const PointCloud * | get_for_read () const |
PointCloud * | get_for_write () |
bool | is_empty () const final |
bool | owns_direct_data () const override |
void | ensure_owns_direct_data () override |
Attribute Access | |
std::optional< blender::bke::AttributeAccessor > | attributes () const final |
std::optional< blender::bke::MutableAttributeAccessor > | attributes_for_write () final |
![]() | |
virtual | ~GeometryComponent ()=default |
GeometryComponent (GeometryComponentType type) | |
int | attribute_domain_size (eAttrDomain domain) const |
void | user_add () const |
void | user_remove () const |
bool | is_mutable () const |
GeometryComponentType | type () const |
Static Public Attributes | |
static constexpr GeometryComponentType | static_type = GEO_COMPONENT_TYPE_POINT_CLOUD |
Additional Inherited Members | |
![]() | |
static GeometryComponent * | create (GeometryComponentType component_type) |
A geometry component that stores a point cloud, corresponding to the PointCloud data structure. While a point cloud is technically a subset of a mesh in some respects, it is useful because of its simplicity, partly on a conceptual level for the user, but also in the code, though partly for historical reasons. Point clouds can also be rendered in special ways, based on the built-in radius
attribute.
Attributes on point clouds are all stored in contiguous arrays in its CustomData, which makes them efficient to process, relative to some legacy built-in mesh attributes.
Definition at line 418 of file BKE_geometry_set.hh.
PointCloudComponent::PointCloudComponent | ( | ) |
Definition at line 15 of file geometry_component_pointcloud.cc.
Referenced by copy().
PointCloudComponent::~PointCloudComponent | ( | ) |
Definition at line 19 of file geometry_component_pointcloud.cc.
References clear().
|
finalvirtual |
Get access to the attributes in this geometry component. May return none if the geometry does not support the attribute system.
Reimplemented from GeometryComponent.
Definition at line 218 of file geometry_component_pointcloud.cc.
References blender::bke::get_pointcloud_accessor_functions_ref().
Referenced by blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_pointcloud(), and blender::nodes::node_geo_points_to_vertices_cc::geometry_set_points_to_vertices().
|
finalvirtual |
Reimplemented from GeometryComponent.
Definition at line 224 of file geometry_component_pointcloud.cc.
References get_for_write(), and blender::bke::get_pointcloud_accessor_functions_ref().
Referenced by blender::nodes::node_geo_distribute_points_on_faces_cc::compute_attribute_outputs(), blender::nodes::node_geo_curve_to_points_cc::ensure_point_attribute(), and blender::nodes::node_geo_points_cc::node_geo_exec().
void PointCloudComponent::clear | ( | ) |
Definition at line 34 of file geometry_component_pointcloud.cc.
References BKE_id_free(), BLI_assert, GeometryComponent::is_mutable(), and Owned.
Referenced by replace(), and ~PointCloudComponent().
|
overridevirtual |
Implements GeometryComponent.
Definition at line 24 of file geometry_component_pointcloud.cc.
References BKE_pointcloud_copy_for_eval(), Owned, and PointCloudComponent().
|
overridevirtual |
Implements GeometryComponent.
Definition at line 91 of file geometry_component_pointcloud.cc.
References BKE_pointcloud_copy_for_eval(), BLI_assert, GeometryComponent::is_mutable(), and Owned.
const PointCloud * PointCloudComponent::get_for_read | ( | ) | const |
Get the point cloud from this component. This method can be used by multiple threads at the same time. Therefore, the returned point cloud should not be modified. No ownership is transferred.
Definition at line 66 of file geometry_component_pointcloud.cc.
Referenced by blender::geometry::gather_realize_tasks_recursive(), blender::nodes::node_geo_merge_by_distance_cc::pointcloud_merge_by_distance(), and blender::nodes::node_geo_delete_geometry_cc::separate_point_cloud_selection().
PointCloud * PointCloudComponent::get_for_write | ( | ) |
Get the point cloud from this component. This method can only be used when the component is mutable, i.e. it is not shared. The returned point cloud can be modified. No ownership is transferred.
Definition at line 71 of file geometry_component_pointcloud.cc.
References BKE_pointcloud_copy_for_eval(), BLI_assert, GeometryComponent::is_mutable(), Owned, and ReadOnly.
Referenced by attributes_for_write().
bool PointCloudComponent::has_pointcloud | ( | ) | const |
Definition at line 45 of file geometry_component_pointcloud.cc.
|
finalvirtual |
Reimplemented from GeometryComponent.
Definition at line 81 of file geometry_component_pointcloud.cc.
|
overridevirtual |
Implements GeometryComponent.
Definition at line 86 of file geometry_component_pointcloud.cc.
References Owned.
PointCloud * PointCloudComponent::release | ( | ) |
Return the point cloud and clear the component. The caller takes over responsibility for freeing the point cloud (if the component was responsible before).
Definition at line 58 of file geometry_component_pointcloud.cc.
References BLI_assert, and GeometryComponent::is_mutable().
Referenced by take_pointcloud_ownership_from_geometry_set().
void PointCloudComponent::replace | ( | PointCloud * | pointcloud, |
GeometryOwnershipType | ownership = GeometryOwnershipType::Owned |
||
) |
Clear the component and replace it with the new point cloud.
Definition at line 50 of file geometry_component_pointcloud.cc.
References BLI_assert, clear(), and GeometryComponent::is_mutable().
Referenced by blender::geometry::execute_realize_pointcloud_tasks(), blender::ed::spreadsheet::spreadsheet_get_display_geometry_set(), and take_pointcloud_ownership_from_geometry_set().
|
inlinestaticconstexpr |
Definition at line 462 of file BKE_geometry_set.hh.