Struct pasture_core::layout::PointAttributeDefinition [−][src]
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]
fn clone(&self) -> PointAttributeDefinition
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for PointAttributeDefinition
[src]
impl Display for PointAttributeDefinition
[src]
impl Eq for PointAttributeDefinition
[src]
impl From<&'_ PointAttributeMember> for PointAttributeDefinition
[src]
fn from(attribute: &PointAttributeMember) -> Self
[src]
impl From<PointAttributeMember> for PointAttributeDefinition
[src]
fn from(attribute: PointAttributeMember) -> Self
[src]
impl PartialEq<PointAttributeDefinition> for PointAttributeDefinition
[src]
fn eq(&self, other: &PointAttributeDefinition) -> bool
[src]
fn ne(&self, other: &PointAttributeDefinition) -> bool
[src]
impl StructuralEq for PointAttributeDefinition
[src]
impl StructuralPartialEq for PointAttributeDefinition
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,