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 the size in bytes of this attribute

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.