DART  6.7.3
dart::utils::FileInfoDof Class Reference

class FileInfoDof More...

#include <FileInfoDof.hpp>

Public Member Functions

 FileInfoDof (dynamics::Skeleton *_skel, double _fps=120.0)
 Constructor. More...
 
virtual ~FileInfoDof ()
 Destructor. More...
 
bool loadFile (const char *_fileName)
 Load file. More...
 
bool saveFile (const char *_fileName, std::size_t _start, std::size_t _end, double _sampleRate=1.0)
 Save file. More...
 
void addDof (const Eigen::VectorXd &_dofs)
 Add Dof. More...
 
double getDofAt (std::size_t _frame, std::size_t _id) const
 Get Dof. More...
 
Eigen::VectorXd getPoseAtFrame (int _frame) const
 Get pose at frame. More...
 
void setFPS (double _fps)
 Set frames per second. More...
 
double getFPS () const
 Get frames per second. More...
 
int getNumFrames () const
 Get number of frames. More...
 
dynamics::SkeletongetSkel () const
 Get skeleton associated with. More...
 

Protected Attributes

dynamics::SkeletonmSkel
 Model associated with. More...
 
double mFPS
 Frame rate. More...
 
std::size_t mNumFrames
 Number of frames. More...
 
char mFileName [256]
 File name. More...
 
std::vector< Eigen::VectorXd > mDofs
 Dof data [frame][dofIndex]. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ FileInfoDof()

dart::utils::FileInfoDof::FileInfoDof ( dynamics::Skeleton _skel,
double  _fps = 120.0 
)

Constructor.

◆ ~FileInfoDof()

dart::utils::FileInfoDof::~FileInfoDof ( )
virtual

Destructor.

Member Function Documentation

◆ addDof()

void dart::utils::FileInfoDof::addDof ( const Eigen::VectorXd &  _dofs)

Add Dof.

◆ getDofAt()

double dart::utils::FileInfoDof::getDofAt ( std::size_t  _frame,
std::size_t  _id 
) const

Get Dof.

◆ getFPS()

double dart::utils::FileInfoDof::getFPS ( ) const

Get frames per second.

◆ getNumFrames()

int dart::utils::FileInfoDof::getNumFrames ( ) const

Get number of frames.

◆ getPoseAtFrame()

Eigen::VectorXd dart::utils::FileInfoDof::getPoseAtFrame ( int  _frame) const

Get pose at frame.

◆ getSkel()

dynamics::Skeleton * dart::utils::FileInfoDof::getSkel ( ) const

Get skeleton associated with.

◆ loadFile()

bool dart::utils::FileInfoDof::loadFile ( const char *  _fileName)

Load file.

◆ saveFile()

bool dart::utils::FileInfoDof::saveFile ( const char *  _fileName,
std::size_t  _start,
std::size_t  _end,
double  _sampleRate = 1.0 
)

Save file.

Note
Down sampling not implemented yet

◆ setFPS()

void dart::utils::FileInfoDof::setFPS ( double  _fps)

Set frames per second.

Member Data Documentation

◆ mDofs

std::vector<Eigen::VectorXd> dart::utils::FileInfoDof::mDofs
protected

Dof data [frame][dofIndex].

◆ mFileName

char dart::utils::FileInfoDof::mFileName[256]
protected

File name.

◆ mFPS

double dart::utils::FileInfoDof::mFPS
protected

Frame rate.

◆ mNumFrames

std::size_t dart::utils::FileInfoDof::mNumFrames
protected

Number of frames.

◆ mSkel

dynamics::Skeleton* dart::utils::FileInfoDof::mSkel
protected

Model associated with.