Crate c3dio

Source
Expand description

§c3dio - Pure Rust C3D Parser

This crate provides a parser for C3D files. C3D is a binary file format used to store motion capture data. The format is described in the C3D file format documentation.

§Examples

use c3dio::prelude::*;

let c3d = C3d::load("tests/data/short.c3d");
assert!(c3d.is_ok());

Re-exports§

pub use analog::Analog;
pub use analog::AnalogFormat;
pub use analog::AnalogOffset;
pub use builder::C3dBuilder;
pub use c3d::C3d;
pub use data::DataFormat;
pub use data::MarkerPoint;
pub use events::Event;
pub use events::EventContext;
pub use events::Events;
pub use forces::ForcePlatform;
pub use forces::ForcePlatformCorners;
pub use forces::ForcePlatformOrigin;
pub use forces::ForcePlatformType;
pub use forces::ForcePlatforms;
pub use manufacturer::Manufacturer;
pub use manufacturer::ManufacturerVersion;
pub use parameters::Parameter;
pub use parameters::ParameterData;
pub use parameters::Parameters;
pub use points::Points;
pub use seg::Seg;
pub use file_formats::trc::Trc;
pub use file_formats::sto::Sto;

Modules§

analog
Includes the analog data and parameters.
builder
The builder module is focused on building a C3d struct for writing to a file. It is focused on composing parts into a valid C3d struct.
c3d
Includes the C3d struct implementation and high-level functions for reading and writing C3D files.
data
Includes data structures and functions for parsing and storing data from a C3D file.
events
Includes event information from the C3D file header and parameter section.
file_formats
Structures to represent auxiliary data types that C3D files can be written to.
forces
Contains force platform information in the form of the ForcePlatforms struct. Includes the C3d struct implementation and high-level functions for reading and writing C3D files.
manufacturer
Contains manufacturer data from the parameter section of a C3D file, if provided.
parameters
Logic for parsing and writing parameters.
points
Implements the Points struct and methods for parsing and writing point data.
prelude
Contains the most commonly used types and functions from this crate.
seg
Structure for storing SEG parameters.

Enums§

C3dParseError
Reports errors that occurred while parsing a C3D file. The error type is returned by the load and from_bytes methods.
C3dWriteError
Reports errors that occurred while writing a C3D file. The error type is returned by the write method.
Processor
Processor type enum for determining endianess of the bytes during parsing and writing. Older C3D files may be stored in Dec or SgiMips format. Most modern C3D files are stored in Intel format. A parser that supports all three formats is required to read all C3D files.