Enables point and attribute views on trait objects (e.g. dyn BorrowedBuffer, dyn InterleavedBuffer etc.). This closes a gap in conjunction with the as_interleaved and as_columnar functions on the BorrowedBuffer trait, and makes code like this possible:
fn accepts_any_buffer<'a, B: BorrowedBuffer<'a>>(buffer: &'a B) {
if let Some(interleaved) = buffer.as_interleaved() {
for point in interleaved.view::<SimplePoint>().iter() {
println!("{point:?}");
}
} else if let Some(columnar) = buffer.as_columnar() {
for position in columnar.view_attribute::<Vector3<f64>>(&POSITION_3D).iter() {
println!("{position}");
}
}
}
Also made some traits objects-safe that weren't before.
Enables point and attribute views on trait objects (e.g.
dyn BorrowedBuffer
,dyn InterleavedBuffer
etc.). This closes a gap in conjunction with theas_interleaved
andas_columnar
functions on theBorrowedBuffer
trait, and makes code like this possible:Also made some traits objects-safe that weren't before.