logo
Expand description

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 and some of its types are re-exported here.

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

Models the definition of an element.

Defines a property of an element.

Enums

Errors concerning the PLY encoding.

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

Data type used to encode properties in the payload.

Traits

Functions

Type Definitions