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) {
156 return mesh.attributes().adapt_domain(
158 mesh.face_normals()),
void BKE_id_free(Main *bmain, void *idv)
Mesh * BKE_mesh_copy_for_eval(const Mesh &source)
static VArray from_span(Span< T > values)
static VArray from_container(ContainerT container)
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
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)
VecBase< int32_t, 2 > int2