Skip to content
Snippets Groups Projects
Commit 64eb8817 authored by Olivier Stasse's avatar Olivier Stasse
Browse files

Revert "Add members and change accessor names"

This reverts commit 8d4c499d.
parent 5f28ddaf
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,7 @@ IntermedQPMat::~IntermedQPMat()
IntermedQPMat::objective_variant_t const &
IntermedQPMat::Objective( const int aObjectiveType ) const
IntermedQPMat::operator ()( const int aObjectiveType ) const
{
switch(aObjectiveType)
{
......@@ -68,7 +68,7 @@ IntermedQPMat::Objective( const int aObjectiveType ) const
IntermedQPMat::objective_variant_t &
IntermedQPMat::Objective( const int aObjectiveType )
IntermedQPMat::operator ()( const int aObjectiveType )
{
switch(aObjectiveType)
{
......@@ -85,7 +85,7 @@ IntermedQPMat::Objective( const int aObjectiveType )
void
IntermedQPMat::dumpObjective( const int aObjectiveType, std::ostream &aos )
IntermedQPMat::printObjective( const int aObjectiveType, std::ostream &aos )
{
IntermedQPMat::objective_variant_t objective;
switch(aObjectiveType)
......@@ -113,29 +113,29 @@ IntermedQPMat::dumpObjective( const int aObjectiveType, std::ostream &aos )
void
IntermedQPMat::dumpState( std::ostream &aos )
IntermedQPMat::printState( std::ostream &aos )
{
}
void
IntermedQPMat::dumpObjective(const char * filename,
IntermedQPMat::printObjective(const char * filename,
const int type)
{
std::ofstream aof;
aof.open(filename,std::ofstream::out);
dumpObjective(type,aof);
printObjective(type,aof);
aof.close();
}
void
IntermedQPMat::dumpState(const char * filename)
IntermedQPMat::printState(const char * filename)
{
std::ofstream aof;
aof.open(filename,std::ofstream::out);
dumpState(aof);
printState(aof);
aof.close();
}
......
......@@ -56,23 +56,24 @@ namespace PatternGeneratorJRL
/// \{
struct state_variant_s
{
/// \brief Reference
reference_t Ref;
/// \brief reference values for the whole preview window
MAL_VECTOR(RefX,double);
MAL_VECTOR(RefY,double);
MAL_VECTOR(RefTheta,double);
/// \brief State of the Center of Mass
com_t CoM;
/// \brief TrunkState
trunk_t Trunk;
/// \brief Selection matrix for the previewed and current feet positions.
MAL_MATRIX(V,double);
MAL_MATRIX(VT,double);
MAL_VECTOR(Vc,double);
/// \brief Current support foot position
supportfoot_t SupportFoot;
double fx, fy;
/// \brief Number of free steps in the preview window
int NbStepsPrw;
/// \}
};
typedef state_variant_s state_variant_t;
......@@ -109,38 +110,26 @@ namespace PatternGeneratorJRL
/// \}
/// \brief Accessors to the state matrices
inline state_variant_t const & State() const
inline state_variant_t const & operator ()() const
{ return m_StateMatrices; };
/// \brief Accessors to the objective dependent matrices
objective_variant_t const & Objective( const int aObjectiveType ) const;
objective_variant_t & Objective( const int aObjectiveType );
objective_variant_t const & operator ()( const int aObjectiveType ) const;
objective_variant_t & operator ()( const int aObjectiveType );
/// \brief Accessors to the Center of Mass
inline com_t const & CoM() const
{ return m_StateMatrices.CoM; };
inline void CoM( const com_t & CoM )
//inline com_t const & operator ()()
//{ return m_StateMatrices.CoM; };
void operator ()( com_t CoM )
{ m_StateMatrices.CoM = CoM; };
/// \brief Accessors to the reference
inline reference_t const & Reference() const
{ return m_StateMatrices.Ref; };
inline reference_t & Reference()
{ return m_StateMatrices.Ref; };
inline void Reference( reference_t & Ref )
{ m_StateMatrices.Ref = Ref; };
/// \brief Printers
void printObjective( const int ObjectiveType, std::ostream &aos );
void printState( std::ostream &aos );
void printObjective(const char * filename, const int Objectivetype);
void printState(const char * filename);
/// \brief Accessors to the Center of Mass
inline supportfoot_t const & SupportFoot() const
{ return m_StateMatrices.SupportFoot; };
inline void SupportFoot( const supportfoot_t & SupportFoot )
{ m_StateMatrices.SupportFoot = SupportFoot; };
/// \brief Dumping
void dumpObjective( const int ObjectiveType, std::ostream &aos );
void dumpState( std::ostream &aos );
void dumpObjective(const char * filename, const int Objectivetype);
void dumpState(const char * filename);
//
//Private members
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment