Blender  V2.93
Static Public Attributes | List of all members
MeshComponent Class Reference

#include <BKE_geometry_set.hh>

Inherits 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)
 
void replace_mesh_but_keep_vertex_group_names (Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
 
Meshrelease ()
 
void copy_vertex_group_names_from_object (const struct Object &object)
 
const blender::Map< std::string, int > & vertex_group_names () const
 
blender::Map< std::string, int > & vertex_group_names ()
 
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
 
- Public Member Functions inherited from GeometryComponent
virtual ~GeometryComponent ()=default
 
template<typename T >
blender::bke::TypedReadAttribute< Tattribute_get_for_read (const blender::StringRef attribute_name, const AttributeDomain domain, const T &default_value) const
 
template<typename T >
blender::bke::TypedReadAttribute< Tattribute_get_constant_for_read (const AttributeDomain domain, const T &value) const
 
 GeometryComponent (GeometryComponentType type)
 
void user_add () const
 
void user_remove () const
 
bool is_mutable () const
 
GeometryComponentType type () const
 
bool attribute_exists (const blender::StringRef attribute_name) const
 
bool attribute_domain_supported (const AttributeDomain domain) const
 
blender::bke::ReadAttributePtr attribute_try_get_for_read (const blender::StringRef attribute_name) const
 
blender::bke::WriteAttributePtr attribute_try_get_for_write (const blender::StringRef attribute_name)
 
bool attribute_try_delete (const blender::StringRef attribute_name)
 
bool attribute_try_create (const blender::StringRef attribute_name, const AttributeDomain domain, const CustomDataType data_type)
 
blender::Set< std::string > attribute_names () const
 
bool attribute_foreach (const AttributeForeachCallback callback) const
 
blender::bke::ReadAttributePtr attribute_try_get_for_read (const blender::StringRef attribute_name, const AttributeDomain domain, const CustomDataType data_type) const
 
blender::bke::ReadAttributePtr attribute_try_get_for_read (const blender::StringRef attribute_name, const AttributeDomain domain) const
 
blender::bke::ReadAttributePtr attribute_get_for_read (const blender::StringRef attribute_name, const AttributeDomain domain, const CustomDataType data_type, const void *default_value) const
 
blender::bke::ReadAttributePtr attribute_get_constant_for_read (const AttributeDomain domain, const CustomDataType data_type, const void *value) const
 
blender::bke::ReadAttributePtr attribute_get_constant_for_read_converted (const AttributeDomain domain, const CustomDataType in_data_type, const CustomDataType out_data_type, const void *value) const
 
OutputAttributePtr attribute_try_get_for_output (const blender::StringRef attribute_name, const AttributeDomain domain, const CustomDataType data_type, const void *default_value=nullptr)
 

Static Public Attributes

static constexpr GeometryComponentType static_type = GEO_COMPONENT_TYPE_MESH
 

Attribute Access

int attribute_domain_size (const AttributeDomain domain) const final
 
blender::bke::ReadAttributePtr attribute_try_adapt_domain (blender::bke::ReadAttributePtr attribute, const AttributeDomain new_domain) const final
 

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.

Definition at line 351 of file BKE_geometry_set.hh.

Constructor & Destructor Documentation

◆ MeshComponent()

MeshComponent::MeshComponent ( )

Definition at line 41 of file geometry_component_mesh.cc.

Referenced by copy().

◆ ~MeshComponent()

MeshComponent::~MeshComponent ( )

Definition at line 45 of file geometry_component_mesh.cc.

References clear().

Member Function Documentation

◆ attribute_domain_size()

int MeshComponent::attribute_domain_size ( const AttributeDomain  domain) const
finalvirtual

◆ attribute_try_adapt_domain()

ReadAttributePtr MeshComponent::attribute_try_adapt_domain ( blender::bke::ReadAttributePtr  attribute,
const AttributeDomain  new_domain 
) const
finalvirtual

◆ clear()

void MeshComponent::clear ( )

◆ copy()

GeometryComponent * MeshComponent::copy ( ) const
overridevirtual

Implements GeometryComponent.

Definition at line 50 of file geometry_component_mesh.cc.

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

◆ copy_vertex_group_names_from_object()

void MeshComponent::copy_vertex_group_names_from_object ( const struct Object object)

◆ ensure_owns_direct_data()

void MeshComponent::ensure_owns_direct_data ( )
overridevirtual

◆ get_for_read()

const Mesh * MeshComponent::get_for_read ( ) const

◆ get_for_write()

Mesh * MeshComponent::get_for_write ( )

◆ has_mesh()

bool MeshComponent::has_mesh ( ) const

Definition at line 73 of file geometry_component_mesh.cc.

◆ is_empty()

bool MeshComponent::is_empty ( ) const
finalvirtual

Reimplemented from GeometryComponent.

Definition at line 155 of file geometry_component_mesh.cc.

◆ owns_direct_data()

bool MeshComponent::owns_direct_data ( ) const
overridevirtual

Implements GeometryComponent.

Definition at line 160 of file geometry_component_mesh.cc.

References Owned.

◆ release()

Mesh * MeshComponent::release ( )

◆ replace()

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

◆ replace_mesh_but_keep_vertex_group_names()

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

◆ vertex_group_names() [1/2]

blender::Map< std::string, int > & MeshComponent::vertex_group_names ( )

Definition at line 131 of file geometry_component_mesh.cc.

◆ vertex_group_names() [2/2]

const blender::Map< std::string, int > & MeshComponent::vertex_group_names ( ) const

Member Data Documentation

◆ static_type

constexpr GeometryComponentType MeshComponent::static_type = GEO_COMPONENT_TYPE_MESH
inlinestaticconstexpr

Definition at line 388 of file BKE_geometry_set.hh.


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