Blender  V3.3
Static Public Attributes | List of all members
PointCloudComponent Class Reference

#include <BKE_geometry_set.hh>

Inheritance diagram for PointCloudComponent:
GeometryComponent

Public Member Functions

Geometry Component Implementation
 PointCloudComponent ()
 
 ~PointCloudComponent ()
 
GeometryComponentcopy () const override
 
void clear ()
 
bool has_pointcloud () const
 
void replace (PointCloud *pointcloud, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
 
PointCloudrelease ()
 
const PointCloudget_for_read () const
 
PointCloudget_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::AttributeAccessorattributes () const final
 
std::optional< blender::bke::MutableAttributeAccessorattributes_for_write () final
 
- Public Member Functions inherited from GeometryComponent
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 Public Member Functions inherited from GeometryComponent
static GeometryComponentcreate (GeometryComponentType component_type)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ PointCloudComponent()

PointCloudComponent::PointCloudComponent ( )

Definition at line 15 of file geometry_component_pointcloud.cc.

Referenced by copy().

◆ ~PointCloudComponent()

PointCloudComponent::~PointCloudComponent ( )

Definition at line 19 of file geometry_component_pointcloud.cc.

References clear().

Member Function Documentation

◆ attributes()

std::optional< blender::bke::AttributeAccessor > PointCloudComponent::attributes ( ) const
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().

◆ attributes_for_write()

std::optional< blender::bke::MutableAttributeAccessor > PointCloudComponent::attributes_for_write ( )
finalvirtual

◆ clear()

void PointCloudComponent::clear ( )

◆ copy()

GeometryComponent * PointCloudComponent::copy ( ) const
overridevirtual

◆ ensure_owns_direct_data()

void PointCloudComponent::ensure_owns_direct_data ( )
overridevirtual

◆ get_for_read()

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().

◆ get_for_write()

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().

◆ has_pointcloud()

bool PointCloudComponent::has_pointcloud ( ) const

Definition at line 45 of file geometry_component_pointcloud.cc.

◆ is_empty()

bool PointCloudComponent::is_empty ( ) const
finalvirtual

Reimplemented from GeometryComponent.

Definition at line 81 of file geometry_component_pointcloud.cc.

◆ owns_direct_data()

bool PointCloudComponent::owns_direct_data ( ) const
overridevirtual

Implements GeometryComponent.

Definition at line 86 of file geometry_component_pointcloud.cc.

References Owned.

◆ release()

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().

◆ replace()

void PointCloudComponent::replace ( PointCloud pointcloud,
GeometryOwnershipType  ownership = GeometryOwnershipType::Owned 
)

Member Data Documentation

◆ static_type

constexpr GeometryComponentType PointCloudComponent::static_type = GEO_COMPONENT_TYPE_POINT_CLOUD
inlinestaticconstexpr

Definition at line 462 of file BKE_geometry_set.hh.


The documentation for this class was generated from the following files: