Data of the C3D file.
More...
#include <Data.h>
Data of the C3D file.
The class stores all the data frames of a given or create C3D into a STL vector of frame.
Definition at line 18 of file Data.h.
◆ Data()
ezc3d::DataNS::Data::Data |
( |
ezc3d::c3d & |
c3d, |
|
|
std::fstream & |
file |
|
) |
| |
Create a filled Data class from a given file.
- Parameters
-
c3d | Reference to the c3d to copy the data in |
file | File to copy the data from |
Definition at line 19 of file Data.cpp.
◆ frame() [1/2]
Get the frame of index idx.
- Parameters
-
idx | The index of the frame |
- Returns
- The frame of index idx
Get the frame of index idx.
Throw a std::out_of_range exception if idx is larger than the number of frames
Definition at line 113 of file Data.cpp.
◆ frame() [2/2]
Add/replace a frame to the data set.
- Parameters
-
frame | the frame to add/replace |
idx | the index of the frame |
Add or replace a particular frame to the data set.
If no idx is sent, then the frame is appended to the data set. If the idx correspond to a specific frame, it replaces it. If idx is outside the data set, it resize the data set accordingly and add the frame where it belongs but leaves the other created frames empty.
Definition at line 137 of file Data.cpp.
◆ frame_nonConst()
Get the frame of index idx in order to be modified by the caller.
- Parameters
-
idx | The index of the frame |
- Returns
- A non-const reference to the frame of index idx
Return a frame in the form of a non-const reference. The user can thereafter modify this frame at will, but with the caution it requires.
Throw a std::out_of_range exception if idx is larger than the number of frames
Definition at line 125 of file Data.cpp.
◆ frames()
Get all the frames from the data set.
- Returns
- The frames
Definition at line 148 of file Data.cpp.
◆ nbFrames()
size_t ezc3d::DataNS::Data::nbFrames |
( |
| ) |
const |
Get the number of frames in the data structure.
- Returns
- The number of frames
Definition at line 108 of file Data.cpp.
◆ print()
void ezc3d::DataNS::Data::print |
( |
| ) |
const |
Print the data.
Print all the data to the console by calling sequentially all the print method for all the frames
Definition at line 93 of file Data.cpp.
◆ write()
void ezc3d::DataNS::Data::write |
( |
std::fstream & |
f | ) |
const |
Write all the data to an opened file.
- Parameters
-
f | Already opened fstream file with write access |
Write all the data to a file by calling sequentially all the write method for all the frames
Definition at line 102 of file Data.cpp.
The documentation for this class was generated from the following files: