Struct pasture_core::layout::PointAttributeDefinition
source ·
[−]pub struct PointAttributeDefinition { /* private fields */ }Expand description
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
Creates a new custom PointAttributeDefinition with the given name and data type
let custom_attribute = PointAttributeDefinition::custom("Custom", PointAttributeDataType::F32);Returns the name of this PointAttributeDefinition
let custom_attribute = PointAttributeDefinition::custom("Custom", PointAttributeDataType::F32);
let name = custom_attribute.name();Returns the datatype of this PointAttributeDefinition
let custom_attribute = PointAttributeDefinition::custom("Custom", PointAttributeDataType::F32);
let datatype = custom_attribute.datatype();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);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
Performs the conversion.
Performs the conversion.
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for PointAttributeDefinition
impl Send for PointAttributeDefinition
impl Sync for PointAttributeDefinition
impl Unpin for PointAttributeDefinition
impl UnwindSafe for PointAttributeDefinition
Blanket Implementations
Mutably borrows from an owned value. Read more
The inverse inclusion map: attempts to construct self from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self is actually part of its subset T (and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self to the equivalent element of its superset.
