j3d.org Code

org.j3d.loaders.c3d
Class C3DHeader

java.lang.Object
  extended by org.j3d.loaders.c3d.C3DHeader

public class C3DHeader
extends java.lang.Object

The representation of most of the header of a C3D file.

The header contains the following information:

A standard C3D header also includes the following information that is not kept by this class as it is only useful for parsing. The definition of the file format can be found at: http://www.c3d.org/

Version:
$Revision: 1.2 $
Author:
Justin Couch

Field Summary
 float analogSampleRate
          The trajectory and analog sample rates
 boolean[] eventDisplayFlag
          Flags about each event derived from the file.
 java.lang.String[] eventLabels
          4 character label associated with each event time.
 float[] eventTimes
          The time the events occur in seconds.
 boolean hasRangeData
          True if range and label data is available
 int maxInterpolationGap
          The maximum interpolation gap between frames.
 int numAnalogChannels
          The number of analog channels recorded in the file
 int numAnalogSamplesPer3DFrame
          The number of analog samples per frame of 3D data
 int numTimeEvents
          The number of defined time events.
 int numTrajectories
          The number of trajectories stored within the file.A trajectory is also sometimes known as a marker, refering to the shiny reflective markers used in motion capture systems.
 int numTrajectorySamples
          The number of trajectory samples stored within the file
 float scaleFactor
          The 3D scale factor used to convert ints to floats.
 float trajectorySampleRate
          The trajectory sample rate
 
Constructor Summary
C3DHeader()
           
 
Method Summary
 java.lang.String toString()
          Generate a string representation of this header.
 java.lang.String toString(boolean showFileDetails)
          Alternate form of the toString() method that has the option of showing private data details from the internals of the way the file is stored.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

numTrajectories

public int numTrajectories
The number of trajectories stored within the file.A trajectory is also sometimes known as a marker, refering to the shiny reflective markers used in motion capture systems.


numTrajectorySamples

public int numTrajectorySamples
The number of trajectory samples stored within the file


trajectorySampleRate

public float trajectorySampleRate
The trajectory sample rate


numAnalogChannels

public int numAnalogChannels
The number of analog channels recorded in the file


numAnalogSamplesPer3DFrame

public int numAnalogSamplesPer3DFrame
The number of analog samples per frame of 3D data


analogSampleRate

public float analogSampleRate
The trajectory and analog sample rates


maxInterpolationGap

public int maxInterpolationGap
The maximum interpolation gap between frames. The spec says the following:
Header word six contains a value that records the maximum interpolation gap length for 3D point data. The use of this item is not specified in the C3D file description although the maximum interpolation gap length value is usually set to indicate the maximum length of invalid 3D point data samples (in frames) over which interpolation was performed in the creation of the C3D file. This may be used by various applications to specify the length of gaps that can be interpolated or gap filled when reading or creating a C3D file. Since the value of the maximum interpolation gap is recorded in 3D frames, it represents time. Note that since this value is not well defined in the C3D file specification, its use does not indicate that any 3D data points are actually interpolated the precise interpretation of this value is left up to the application that created the data. Any application reading the C3D file may, if necessary or requested, override this value and interpolate gaps of any length.


scaleFactor

public float scaleFactor
The 3D scale factor used to convert ints to floats. If this is -1 the the raw data is already in floating point format.


hasRangeData

public boolean hasRangeData
True if range and label data is available


numTimeEvents

public int numTimeEvents
The number of defined time events. Maximum of 18.


eventTimes

public float[] eventTimes
The time the events occur in seconds. Array is length numTimeEvents


eventDisplayFlag

public boolean[] eventDisplayFlag
Flags about each event derived from the file. True is the same as on, as stored in the file, false is off. Array is length numTimeEvents


eventLabels

public java.lang.String[] eventLabels
4 character label associated with each event time. In old versions of the file format, these may be only 2 characters.

Constructor Detail

C3DHeader

public C3DHeader()
Method Detail

toString

public java.lang.String toString()
Generate a string representation of this header.

Overrides:
toString in class java.lang.Object
Returns:
Information about the header

toString

public java.lang.String toString(boolean showFileDetails)
Alternate form of the toString() method that has the option of showing private data details from the internals of the way the file is stored.

Parameters:
showFileDetails - true if the private data should be shown
Returns:
Information about the header

j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org