39 if (mesh_ !=
nullptr) {
49 if (mesh_ !=
nullptr) {
59 return mesh_ !=
nullptr;
67 ownership_ = ownership;
95 return mesh_ ==
nullptr;
117 mesh_->count_memory(memory);
130 const bool no_corner_normals,
131 const bool true_normals)
136 mesh.face_normals());
140 mesh.vert_normals());
150 mask.foreach_index([&](
const int i) {
151 const int2 &edge = edges[i];
159 if (no_corner_normals || true_normals) {
160 return mesh.attributes().adapt_domain(
162 mesh.face_normals()),
static VArray from_span(Span< T > values)
static VArray from_container(ContainerT container)
AttributeAccessor(const void *owner, const AttributeAccessorFunctions &fn)
GeometryComponent(Type type)
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
std::optional< AttributeAccessor > attributes() const final
std::optional< MutableAttributeAccessor > attributes_for_write() final
MutableAttributeAccessor(void *owner, const AttributeAccessorFunctions &fn)
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)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
Mesh * BKE_mesh_copy_for_eval(const Mesh &source)
VecBase< int32_t, 2 > int2
void BKE_id_free(Main *bmain, void *idv)