MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/splashsurf / num_points

Method num_points

splashsurf_lib/src/io/bgeo_format.rs:323–329  ·  view source on GitHub ↗

Returns the number of points for this attribute storage

(&self)

Source from the content-addressed store, hash-verified

321impl 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> {

Callers 1

write_bgeoFunction · 0.80

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected