Skip to main content

draco_io/
ply_format.rs

1/// PLY storage format.
2#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
3pub enum PlyFormat {
4    /// Text PLY format.
5    #[default]
6    Ascii,
7    /// Binary little-endian PLY format.
8    BinaryLittleEndian,
9    /// Binary big-endian PLY format.
10    BinaryBigEndian,
11}
12
13impl PlyFormat {
14    /// Return the token used in a PLY header for this format.
15    pub fn as_ply_token(self) -> &'static str {
16        match self {
17            PlyFormat::Ascii => "ascii",
18            PlyFormat::BinaryLittleEndian => "binary_little_endian",
19            PlyFormat::BinaryBigEndian => "binary_big_endian",
20        }
21    }
22}