Returns the number of points for this attribute storage
(&self)
| 321 | impl AttributeStorage { |
| 322 | /// Returns the number of points for this attribute storage |
| 323 | fn num_points(&self) -> usize { |
| 324 | match self { |
| 325 | AttributeStorage::Int(v) => v.len(), |
| 326 | AttributeStorage::Float(v) => v.len(), |
| 327 | AttributeStorage::Vector(n, v) => v.len() / n, |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | /// Tries to convert this BGEO attribute storage into a mesh [`AttributeData`] storage |
| 332 | fn try_into_attribute_data<R: Real>(&self) -> Result<OwnedAttributeData<R>, anyhow::Error> { |