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

#include <BKE_geometry_set.hh>

Inheritance diagram for MeshComponent:
GeometryComponent

Public Member Functions

Geometry Component Implementation
 MeshComponent ()
 
 ~MeshComponent ()
 
GeometryComponentcopy () const override
 
void clear ()
 
bool has_mesh () const
 
void replace (Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
 
Meshrelease ()
 
const Meshget_for_read () const
 
Meshget_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_MESH
 

Additional Inherited Members

- Static Public Member Functions inherited from GeometryComponent
static GeometryComponentcreate (GeometryComponentType component_type)
 

Detailed Description

A geometry component that can store a mesh, using the Mesh data-block.

Attributes are stored, on any of the four attribute domains. Generic attributes are stored in contiguous arrays, but often built-in attributes are stored in an array of structs fashion for historical reasons, requiring more complex attribute access.

Definition at line 364 of file BKE_geometry_set.hh.

Constructor & Destructor Documentation

◆ MeshComponent()

MeshComponent::MeshComponent ( )

Definition at line 25 of file geometry_component_mesh.cc.

Referenced by copy().

◆ ~MeshComponent()

MeshComponent::~MeshComponent ( )

Definition at line 29 of file geometry_component_mesh.cc.

References clear().

Member Function Documentation

◆ attributes()

std::optional< blender::bke::AttributeAccessor > MeshComponent::attributes ( ) const
finalvirtual

◆ attributes_for_write()

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

◆ clear()

void MeshComponent::clear ( )

Definition at line 44 of file geometry_component_mesh.cc.

References BKE_id_free(), BLI_assert, GeometryComponent::is_mutable(), and Owned.

Referenced by replace(), and ~MeshComponent().

◆ copy()

GeometryComponent * MeshComponent::copy ( ) const
overridevirtual

Implements GeometryComponent.

Definition at line 34 of file geometry_component_mesh.cc.

References BKE_mesh_copy_for_eval(), MeshComponent(), and Owned.

◆ ensure_owns_direct_data()

void MeshComponent::ensure_owns_direct_data ( )
overridevirtual

◆ get_for_read()

const Mesh * MeshComponent::get_for_read ( ) const

Get the mesh from this component. This method can be used by multiple threads at the same time. Therefore, the returned mesh should not be modified. No ownership is transferred.

Definition at line 76 of file geometry_component_mesh.cc.

Referenced by blender::nodes::node_geo_dual_mesh_cc::calc_dual_mesh(), blender::nodes::node_geo_transfer_attribute_cc::NearestInterpolatedTransferFunction::call(), blender::nodes::node_geo_distribute_points_on_faces_cc::compute_attribute_outputs(), blender::nodes::node_geo_distribute_points_on_faces_cc::distribute_points_poisson_disk(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_edges(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_faces(), blender::geometry::gather_realize_tasks_recursive(), blender::nodes::node_geo_edge_paths_to_selection_cc::PathToEdgeSelectionFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_mesh_face_is_planar_cc::PlanarFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_shortest_edge_paths_cc::ShortestEdgePathsNextVertFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_shortest_edge_paths_cc::ShortestEdgePathsCostFieldInput::get_varray_for_context(), blender::nodes::node_geo_material_selection_cc::MaterialSelectionFieldInput::get_varray_for_context(), blender::bke::NormalFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_mesh_edge_angle_cc::AngleFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_mesh_edge_angle_cc::SignedAngleFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_mesh_edge_neighbors_cc::EdgeNeighborCountFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_mesh_island_cc::IslandFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_mesh_island_cc::IslandCountFieldInput::get_varray_for_context(), blender::nodes::node_geo_merge_by_distance_cc::mesh_merge_by_distance_all(), blender::nodes::node_geo_merge_by_distance_cc::mesh_merge_by_distance_connected(), modifier_modify_mesh_and_geometry_set(), blender::nodes::node_geo_edge_split_cc::node_geo_exec(), blender::nodes::node_geo_distribute_points_on_faces_cc::propagate_existing_attributes(), and blender::nodes::node_geo_delete_geometry_cc::separate_mesh_selection().

◆ get_for_write()

Mesh * MeshComponent::get_for_write ( )

◆ has_mesh()

bool MeshComponent::has_mesh ( ) const

◆ is_empty()

bool MeshComponent::is_empty ( ) const
finalvirtual

Reimplemented from GeometryComponent.

Definition at line 91 of file geometry_component_mesh.cc.

◆ owns_direct_data()

bool MeshComponent::owns_direct_data ( ) const
overridevirtual

Implements GeometryComponent.

Definition at line 96 of file geometry_component_mesh.cc.

References Owned.

◆ release()

Mesh * MeshComponent::release ( )

Return the mesh and clear the component. The caller takes over responsibility for freeing the mesh (if the component was responsible before).

Definition at line 68 of file geometry_component_mesh.cc.

References BLI_assert, GeometryComponent::is_mutable(), and mesh.

Referenced by modifier_modify_mesh_and_geometry_set().

◆ replace()

void MeshComponent::replace ( Mesh mesh,
GeometryOwnershipType  ownership = GeometryOwnershipType::Owned 
)

Member Data Documentation

◆ static_type

constexpr GeometryComponentType MeshComponent::static_type = GEO_COMPONENT_TYPE_MESH
inlinestaticconstexpr

Definition at line 402 of file BKE_geometry_set.hh.


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