35 if (mesh_ !=
nullptr) {
45 if (mesh_ !=
nullptr) {
55 return mesh_ !=
nullptr;
63 ownership_ = ownership;
91 return mesh_ ==
nullptr;
113 mesh_->count_memory(memory);
126 const bool no_corner_normals,
127 const bool true_normals)
132 mesh.face_normals());
136 mesh.vert_normals());
146 mask.foreach_index([&](
const int i) {
147 const int2 &edge = edges[i];
155 if (no_corner_normals || true_normals) {
178std::optional<AttributeAccessor> MeshComponent::attributes()
const
183std::optional<MutableAttributeAccessor> MeshComponent::attributes_for_write()
void BKE_id_free(Main *bmain, void *idv)
Mesh * BKE_mesh_copy_for_eval(const Mesh &source)
static VArray ForContainer(ContainerT container)
static VArray ForSpan(Span< T > values)
void ensure_owns_direct_data() override
bool is_empty() const final
void replace(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
GeometryComponentPtr copy() const override
~MeshComponent() override
bool owns_direct_data() const override
void count_memory(MemoryCounter &memory) const override
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
ImplicitSharingPtr< GeometryComponent > GeometryComponentPtr
const AttributeAccessorFunctions & mesh_attribute_accessor_functions()
VArray< float3 > mesh_normals_varray(const Mesh &mesh, const IndexMask &mask, AttrDomain domain, bool no_corner_normals=false, bool true_normals=false)
T interpolate(const T &a, const T &b, const FactorT &t)
MatBase< T, NumCol, NumRow > normalize(const MatBase< T, NumCol, NumRow > &a)