Struct pasture_core::layout::PointAttributeDefinition[][src]

pub struct PointAttributeDefinition { /* fields omitted */ }

A definition for a single point attribute of a point cloud. Point attributes are things like the position, GPS time, intensity etc. In Pasture, attributes are identified by a unique name together with the data type that a single record of the attribute is stored in. Attributes can be grouped into two categories: Built-in attributes (e.g. POSITION_3D, INTENSITY, GPS_TIME etc.) and custom attributes.

Implementations

impl PointAttributeDefinition[src]

pub fn custom(name: &'static str, datatype: PointAttributeDataType) -> Self[src]

Creates a new custom PointAttributeDefinition with the given name and data type

let custom_attribute = PointAttributeDefinition::custom("Custom", PointAttributeDataType::F32);

pub fn name(&self) -> &'static str[src]

Returns the name of this PointAttributeDefinition

let custom_attribute = PointAttributeDefinition::custom("Custom", PointAttributeDataType::F32);
let name = custom_attribute.name();

pub fn datatype(&self) -> PointAttributeDataType[src]

Returns the datatype of this PointAttributeDefinition

let custom_attribute = PointAttributeDefinition::custom("Custom", PointAttributeDataType::F32);
let datatype = custom_attribute.datatype();

pub fn size(&self) -> u64[src]

Returns the size in bytes of this attribute

pub fn with_custom_datatype(&self, new_datatype: PointAttributeDataType) -> Self[src]

Returns a new PointAttributeDefinition based on this PointAttributeDefinition, but with a different datatype

let custom_position_attribute = attributes::POSITION_3D.with_custom_datatype(PointAttributeDataType::Vec3f32);

pub fn at_offset_in_type(&self, offset: u64) -> PointAttributeMember[src]

Creates a PointAttributeMember from the associated PointAttributeDefinition by specifying an offset of the attribute within a PointType. This turns an abstract PointAttributeDefinition into a concrete PointAttributeMember

let custom_position_attribute = attributes::POSITION_3D.at_offset_in_type(8);

Trait Implementations

impl Clone for PointAttributeDefinition[src]

impl Debug for PointAttributeDefinition[src]

impl Display for PointAttributeDefinition[src]

impl Eq for PointAttributeDefinition[src]

impl From<&'_ PointAttributeMember> for PointAttributeDefinition[src]

impl From<PointAttributeMember> for PointAttributeDefinition[src]

impl PartialEq<PointAttributeDefinition> for PointAttributeDefinition[src]

impl StructuralEq for PointAttributeDefinition[src]

impl StructuralPartialEq for PointAttributeDefinition[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,