Module pasture_core::containers[][src]

Provides the core data structures and traits for storing point cloud data in memory.

Pasture exposes a hierarchy of traits that define the capabilities of the in-memory buffers that the point data is stored in. The most basic trait is PointBuffer, which is implemented by every specific point cloud buffer in Pasture. It provides basic access to the point data without making any assumptions about the memory layout of the point data. More specific types include InterleavedPointBuffer and PerAttributePointBuffer, which store data in an Interleaved or PerAttribute memory layout. For an explanation of these memory layouts, see the PointLayout type.

On top of these traits, Pasture provides some specific implementations for storing contiguous point data in Interleaved or PerAttribute layouts, as well as non-owning and sliced versions of these buffers.

Lastly, this module exposes some helper functions for iterating over the point data inside any of these buffers.

Modules

attr1

Contains iterators over a single point attribute

attr2
attr3
attr4
iterators

Contains Iterator implementations through which the untyped contents of PointBuffer structures can be accessed in a safe and strongly-typed manner.

Structs

InterleavedPointBufferSlice

Non-owning, read-only slice of the data of an InterleavedPointBuffer

InterleavedPointView

A non-owning view for a contiguous slice of interleaved point data. This is like InterleavedVecPointBuffer, but it does not own the point data. It is useful for passing around point data in an untyped but safe manner, for example in I/O heavy code.

InterleavedVecPointStorage

PointBuffer type that uses Interleaved memory layout and Vec-based owning storage for point data

PerAttributePointBufferSlice

Non-owning, read-only slice of the data of a PerAttributePointBuffer

PerAttributePointBufferSliceMut

Non-owning, mutable slice of the data of a PerAttributePointBufferMut

PerAttributePointView

A non-owning view for per-attribute point data. This is like PerAttributeVecPointBuffer, but it does not own the point data. It is useful for passing around point data in an untyped but safe manner, for example in I/O heavy code.

PerAttributeVecPointStorage

PointBuffer type that uses PerAttribute memory layout and Vec-based owning storage for point data

PerAttributeVecPointStoragePusher

Helper structure for pushing separate attributes into a PerAttributeVecPointStorage. Only through this type, using the builder pattern, is it possible to correctly push data for one attribute at a time into the buffer. This type enforces that, at the end of all attribute push operations, the PointLayout of the newly pushed attributes exactly matches the PointLayout of the buffer.

Traits

InterleavedPointBuffer

Trait for PointBuffer types that store point data in Interleaved memory layout. In an InterleavedPointBuffer, all attributes for a single point are stored together in memory. To illustrate this, suppose the PointLayout of some point type defines the default attributes POSITION_3D (Vector3<f64>), INTENSITY (u16) and CLASSIFICATION (u8). In an InterleavedPointBuffer, the data layout is like this:
[Vector3<f64>, u16, u8, Vector3<f64>, u16, u8, ...]
|------Point 1-------| |------Point 2-------| |--...

InterleavedPointBufferExt

Extension trait that provides generic methods for accessing point data in an InterleavedPointBuffer

InterleavedPointBufferMut

Trait for InterleavedPointBuffer types that provide mutable access to the point data

InterleavedPointBufferMutExt

Extension trait that provides generic methods for accessing point data in an InterleavedPointBufferMut

PerAttributePointBuffer

Trait for PointBuffer types that store point data in PerAttribute memory layout. In buffers of this type, the data for a single attribute of all points in stored together in memory. To illustrate this, suppose the PointLayout of some point type defines the default attributes POSITION_3D (Vector3<f64>), INTENSITY (u16) and CLASSIFICATION (u8). In a PerAttributePointBuffer, the data layout is like this:
[Vector3<f64>, Vector3<f64>, Vector3<f64>, ...]
[u16, u16, u16, ...]
[u8, u8, u8, ...]

PerAttributePointBufferExt

Extension trait that provides generic methods for accessing attribute data in an PerAttributePointBuffer

PerAttributePointBufferMut

Trait for PerAttributePointBuffer types that provide mutable access to specific attributes

PerAttributePointBufferMutExt

Extension trait that provides generic methods for accessing attribute data in an PerAttributePointBufferMut

PointBuffer

Base trait for all containers that store point data. A PointBuffer stores any number of point entries with a layout defined by the PointBuffers associated PointLayout structure.

PointBufferExt

Extension trait that provides generic methods for accessing point data in a PointBuffer

PointBufferWriteable

Trait for all mutable PointBuffers, that is all PointBuffers where it is possible to push points into. Distinguishing between read-only PointBuffer and mutable PointBufferMut traits enables read-only, non-owning views of a PointBuffer with the same interface as an owning PointBuffer!