Cleanup: ATTR_RADIUS unused warning with clang

This commit is contained in:
Brecht Van Lommel
2024-12-19 22:45:46 +01:00
parent d3d19724d8
commit 7e9a48eb98
2 changed files with 12 additions and 0 deletions

View File

@@ -214,6 +214,9 @@ class CurvesGeometry : public ::CurvesGeometry {
Span<float3> positions() const;
MutableSpan<float3> positions_for_write();
VArray<float> radius() const;
MutableSpan<float> radius_for_write();
/** Whether the curve loops around to connect to itself, on the curve domain. */
VArray<bool> cyclic() const;
/** Mutable access to curve cyclic values. Call #tag_topology_changed after changes. */

View File

@@ -359,6 +359,15 @@ MutableSpan<float3> CurvesGeometry::positions_for_write()
return get_mutable_attribute<float3>(*this, AttrDomain::Point, ATTR_POSITION);
}
VArray<float> CurvesGeometry::radius() const
{
return get_varray_attribute<float>(*this, AttrDomain::Point, ATTR_RADIUS, 0.01f);
}
MutableSpan<float> CurvesGeometry::radius_for_write()
{
return get_mutable_attribute<float>(*this, AttrDomain::Point, ATTR_RADIUS);
}
Span<int> CurvesGeometry::offsets() const
{
if (this->curve_num == 0) {