[][src]Module plexus::encoding::ply

PLY encoding.

This module provides support for the PLY format via the FromPly and ToPly traits. These traits can be used with a decoder and encoder to read and write mesh data structures to and from the PLY format.

PLY support is implemented using the ply-rs crate.

Examples

Reading a PLY file into a MeshGraph:

use nalgebra::Point3;
use plexus::encoding::ply::{FromPly, PositionEncoding};
use plexus::graph::MeshGraph;
use std::io::Read;

type E3 = Point3<f64>;

// Read from a file, network, etc.
fn read() -> impl Read {
    // ...
}

let encoding = PositionEncoding::<E3>::default();
let (graph, _) = MeshGraph::<E3>::from_ply(encoding, read()).unwrap();

Structs

ElementDefinition

Models the definition of an element.

PositionEncoding
PropertyDefinition

Defines a property of an element.

Enums

PlyError
Property

Wrapper used to implement a dynamic type system as required by the PLY file format.

PropertyType

Data type used to encode properties in the payload.

Traits

ElementExt
FaceElementDecoder
FacePropertyDecoder
FromPly
PropertyExt
ToPly
VertexElementDecoder
VertexPropertyDecoder

Functions

decode_elements

Type Definitions

Element
Header
Payload