Project Description

C3D.NET is a free class library written in C# for manipulating C3D file. This project supports .NET 2.0 and .NET 4.0, and provides a free Data Viewer based on this library.

The C3D format is a public domain, binary file format that has been used in Biomechanics, Animation and Gait Analysis laboratories to record synchronized 3D and analog data.

For more information on C3D file, please visit http://www.c3d.org

Examle Usage

You can use these code to load a C3D file and output all points.

C3DFile file = C3DFile.LoadFromFile("FILE PATH");
UInt16 firstFrameIndex = file.Header.FirstFrameIndex;
UInt16 pointCount = file.Parameters.GetParameterData<UInt16>("POINT:USED");

for (Int32 i = 0; i < file.AllFrames.Count; i++)
{
    C3DFrame frame = file.AllFrames[i];

    for (Int32 j = 0; j < pointCount; j++)
    {
        C3DPoint3DData point3D = frame.Point3Ds[j];

        Console.WriteLine("Frame {0} : X = {1}, Y = {2}, Z = {3}",
            firstFrameIndex + i, point3D.X, point3D.Y, point3D.Z);
    }
}

More

CodePlex Page: https://c3d.codeplex.com
GitHub Page: https://github.com/mayswind/C3D.NET
A Chinese article about C3D file type and this project: http://www.cnblogs.com/mayswind/p/3369090.html

Last edited Dec 1, 2013 at 2:03 PM by mayswind, version 29