Skip to main content

GeometryEncoder

Struct GeometryEncoder 

Source
pub struct GeometryEncoder {
Show 13 fields pub meta: IntEncoder, pub geometries: IntEncoder, pub rings: IntEncoder, pub rings2: IntEncoder, pub no_rings: IntEncoder, pub parts: IntEncoder, pub parts_ring: IntEncoder, pub only_parts: IntEncoder, pub triangles: IntEncoder, pub triangles_indexes: IntEncoder, pub vertex: IntEncoder, pub vertex_offsets: IntEncoder, pub vertex_buffer_type: VertexBufferType,
}
Expand description

How to encode Geometry

Fields§

§meta: IntEncoder

Encoding settings for the geometry types (meta) stream.

§geometries: IntEncoder

Encoding for the geometry length stream.

§rings: IntEncoder

Encoding for parts length stream when rings are present.

§rings2: IntEncoder

Encoding for ring vertex-count stream.

§no_rings: IntEncoder

Encoding for parts length stream when rings are not present.

§parts: IntEncoder

Encoding for parts length stream (with rings) when geometry_offsets absent.

§parts_ring: IntEncoder

Encoding for ring lengths when geometry_offsets absent.

§only_parts: IntEncoder

Encoding for parts-only stream (e.g. LineString, no rings).

§triangles: IntEncoder

Encoding for triangles count stream (pre-tessellated polygons).

§triangles_indexes: IntEncoder

Encoding for triangle index buffer (pre-tessellated polygons).

§vertex: IntEncoder

Encoding for the vertex data stream (logical encoding is always ComponentwiseDelta if vertex_buffer_type==Vec2).

§vertex_offsets: IntEncoder

Encoding for vertex offsets (used when vertex_buffer_type is not Vec2).

§vertex_buffer_type: VertexBufferType

How the vertex buffer should be encoded.

Implementations§

Source§

impl GeometryEncoder

Source

pub fn all(encoder: IntEncoder) -> Self

Use the provided encoder for all streams.

Source

pub fn meta(&mut self, e: IntEncoder) -> &mut Self

Set encoding for the geometry types (meta) stream.

Source

pub fn geometries(&mut self, e: IntEncoder) -> &mut Self

Set encoding for the geometry length stream.

Source

pub fn rings(&mut self, e: IntEncoder) -> &mut Self

Set encoding for parts length stream when rings are present.

Source

pub fn rings2(&mut self, e: IntEncoder) -> &mut Self

Set encoding for ring vertex-count stream.

Source

pub fn no_rings(&mut self, e: IntEncoder) -> &mut Self

Set encoding for parts length stream when rings are not present.

Source

pub fn parts(&mut self, e: IntEncoder) -> &mut Self

Set encoding for parts length stream (with rings) when geometry_offsets absent.

Source

pub fn parts_ring(&mut self, e: IntEncoder) -> &mut Self

Set encoding for ring lengths when geometry_offsets absent.

Source

pub fn only_parts(&mut self, e: IntEncoder) -> &mut Self

Set encoding for parts-only stream (e.g. LineString, no rings).

Source

pub fn triangles(&mut self, e: IntEncoder) -> &mut Self

Set encoding for triangles count stream (pre-tessellated polygons).

Source

pub fn triangles_indexes(&mut self, e: IntEncoder) -> &mut Self

Set encoding for triangle index buffer (pre-tessellated polygons).

Source

pub fn vertex(&mut self, e: IntEncoder) -> &mut Self

Set encoding for the vertex data stream.

Source

pub fn vertex_offsets(&mut self, e: IntEncoder) -> &mut Self

Set encoding for vertex offsets (dictionary encoding).

Source

pub fn vertex_buffer_type(&mut self, t: VertexBufferType) -> &mut Self

Set the vertex buffer encoding type.

Trait Implementations§

Source§

impl Clone for GeometryEncoder

Source§

fn clone(&self) -> GeometryEncoder

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GeometryEncoder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for GeometryEncoder

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V