Commit 1a746749 authored by florent's avatar florent
Browse files

Replace class JointProperties by Joint.

	*  Makefile.am,
	* freeflyer-joint.hh,
	* joint.cc,
	* joint.hh,
	* rotation-joint.hh,
	* translation-joint.hh.
parent 28bbf00c
......@@ -20,8 +20,8 @@ else
libhppCore_la_LIBADD += @HPPMODEL_LIBS@
libhppCore_la_SOURCES += \
parser.cc \
joint-properties.cc \
joint-properties.hh \
joint.cc \
joint.hh \
freeflyer-joint.hh \
rotation-joint.hh \
translation-joint.hh
......
......@@ -9,7 +9,7 @@
#include <KineoModel/kppFreeFlyerJointComponent.h>
#include "joint-properties.hh"
#include "joint.hh"
namespace hpp {
namespace core {
......@@ -28,7 +28,7 @@ namespace hpp {
/// transformed into a ChppHumanoidRobot.
class FreeflyerJoint : public CkppFreeFlyerJointComponent,
public JointProperties
public Joint
{
public:
virtual bool isComponentClonable () const
......@@ -72,7 +72,7 @@ namespace hpp {
ktStatus status = KD_OK;
status = CkppFreeFlyerJointComponent::init(inWeakPtr, inName);
if (status == KD_ERROR) return KD_ERROR;
return JointProperties::init(inWeakPtr);
return Joint::init(inWeakPtr);
}
};
} // namespace io
......
......@@ -5,66 +5,66 @@
#include <KineoModel/kppDoubleProperty.h>
#include "joint-properties.hh"
#include "joint.hh"
using hpp::core::io::JointProperties;
using hpp::core::io::Joint;
// Mass
const CkppProperty::TPropertyID
JointProperties::MASS_ID(CkppProperty::makeID());
const std::string JointProperties::MASS_STRING_ID("MASS");
Joint::MASS_ID(CkppProperty::makeID());
const std::string Joint::MASS_STRING_ID("MASS");
const CkppProperty::TPropertyID
// Center of mass
// X coordinate
JointProperties::COM_X_ID(CkppProperty::makeID());
const std::string JointProperties::COM_X_STRING_ID("COM_X");
Joint::COM_X_ID(CkppProperty::makeID());
const std::string Joint::COM_X_STRING_ID("COM_X");
// Y coordinate
const CkppProperty::TPropertyID
JointProperties::COM_Y_ID(CkppProperty::makeID());
const std::string JointProperties::COM_Y_STRING_ID("COM_Y");
Joint::COM_Y_ID(CkppProperty::makeID());
const std::string Joint::COM_Y_STRING_ID("COM_Y");
// Z coordinate
const CkppProperty::TPropertyID
JointProperties::COM_Z_ID(CkppProperty::makeID());
const std::string JointProperties::COM_Z_STRING_ID("COM_Z");
Joint::COM_Z_ID(CkppProperty::makeID());
const std::string Joint::COM_Z_STRING_ID("COM_Z");
// Inertia matrix
// XX coefficient
const CkppProperty::TPropertyID
JointProperties::INERTIA_MATRIX_XX_ID(CkppProperty::makeID());
Joint::INERTIA_MATRIX_XX_ID(CkppProperty::makeID());
const std::string
JointProperties::INERTIA_MATRIX_XX_STRING_ID("INERTIA_MATRIX_XX");
Joint::INERTIA_MATRIX_XX_STRING_ID("INERTIA_MATRIX_XX");
// YY coefficient
const CkppProperty::TPropertyID
JointProperties::INERTIA_MATRIX_YY_ID(CkppProperty::makeID());
Joint::INERTIA_MATRIX_YY_ID(CkppProperty::makeID());
const std::string
JointProperties::INERTIA_MATRIX_YY_STRING_ID("INERTIA_MATRIX_YY");
Joint::INERTIA_MATRIX_YY_STRING_ID("INERTIA_MATRIX_YY");
// ZZ coefficient
const CkppProperty::TPropertyID
JointProperties::INERTIA_MATRIX_ZZ_ID(CkppProperty::makeID());
Joint::INERTIA_MATRIX_ZZ_ID(CkppProperty::makeID());
const std::string
JointProperties::INERTIA_MATRIX_ZZ_STRING_ID("INERTIA_MATRIX_ZZ");
Joint::INERTIA_MATRIX_ZZ_STRING_ID("INERTIA_MATRIX_ZZ");
// XY coefficient
const CkppProperty::TPropertyID
JointProperties::INERTIA_MATRIX_XY_ID(CkppProperty::makeID());
Joint::INERTIA_MATRIX_XY_ID(CkppProperty::makeID());
const std::string
JointProperties::INERTIA_MATRIX_XY_STRING_ID("INERTIA_MATRIX_XY");
Joint::INERTIA_MATRIX_XY_STRING_ID("INERTIA_MATRIX_XY");
// XZ coefficient
const CkppProperty::TPropertyID
JointProperties::INERTIA_MATRIX_XZ_ID(CkppProperty::makeID());
Joint::INERTIA_MATRIX_XZ_ID(CkppProperty::makeID());
const std::string
JointProperties::INERTIA_MATRIX_XZ_STRING_ID("INERTIA_MATRIX_XZ");
Joint::INERTIA_MATRIX_XZ_STRING_ID("INERTIA_MATRIX_XZ");
// YZ coefficient
const CkppProperty::TPropertyID
JointProperties::INERTIA_MATRIX_YZ_ID(CkppProperty::makeID());
Joint::INERTIA_MATRIX_YZ_ID(CkppProperty::makeID());
const std::string
JointProperties::INERTIA_MATRIX_YZ_STRING_ID("INERTIA_MATRIX_YZ");
Joint::INERTIA_MATRIX_YZ_STRING_ID("INERTIA_MATRIX_YZ");
JointProperties::JointProperties()
Joint::Joint()
{
}
ktStatus JointProperties::init(const CkppComponentWkPtr& inWeakPtr)
ktStatus Joint::init(const CkppComponentWkPtr& inWeakPtr)
{
CkppComponentShPtr component = inWeakPtr.lock();
mass = CkppDoubleProperty::create("MASS", component,
......
......@@ -3,8 +3,8 @@
Author: Florent Lamiraux
*/
#ifndef HPP_CORE_JOINT_PROPERTIES_HH
#define HPP_CORE_JOINT_PROPERTIES_HH
#ifndef HPP_CORE_JOINT_HH
#define HPP_CORE_JOINT_HH
#include <KineoModel/kppProperty.h>
......@@ -13,8 +13,8 @@ KIT_PREDEF_CLASS(CkppDoubleProperty);
namespace hpp {
namespace core {
namespace io {
KIT_PREDEF_CLASS(JointProperties)
class JointProperties
KIT_PREDEF_CLASS(Joint)
class Joint
{
public:
// Mass
......@@ -55,7 +55,7 @@ namespace hpp {
CkppDoublePropertyShPtr inertiaMatrixYZ;
protected:
JointProperties();
Joint();
/// Create properties
ktStatus init(const CkppComponentWkPtr& inComponent);
};
......@@ -63,4 +63,4 @@ namespace hpp {
} // namespace core
} // namespace hpp
#endif // HPP_CORE_JOINT_PROPERTIES_HH
#endif // HPP_CORE_JOINT_HH
......@@ -9,7 +9,7 @@
#include <KineoModel/kppRotationJointComponent.h>
#include "joint-properties.hh"
#include "joint.hh"
namespace hpp {
namespace core {
......@@ -28,7 +28,7 @@ namespace hpp {
/// transformed into a ChppHumanoidRobot.
class RotationJoint : public CkppRotationJointComponent,
public JointProperties
public Joint
{
public:
virtual bool isComponentClonable () const
......@@ -72,7 +72,7 @@ namespace hpp {
ktStatus status = KD_OK;
status = CkppRotationJointComponent::init(inWeakPtr, inName);
if (status == KD_ERROR) return KD_ERROR;
return JointProperties::init(inWeakPtr);
return Joint::init(inWeakPtr);
}
};
} // namespace io
......
......@@ -9,7 +9,7 @@
#include <KineoModel/kppTranslationJointComponent.h>
#include "joint-properties.hh"
#include "joint.hh"
namespace hpp {
namespace core {
......@@ -28,7 +28,7 @@ namespace hpp {
/// transformed into a ChppHumanoidRobot.
class TranslationJoint : public CkppTranslationJointComponent,
public JointProperties
public Joint
{
public:
virtual bool isComponentClonable () const
......@@ -72,7 +72,7 @@ namespace hpp {
ktStatus status = KD_OK;
status = CkppTranslationJointComponent::init(inWeakPtr, inName);
if (status == KD_ERROR) return KD_ERROR;
return JointProperties::init(inWeakPtr);
return Joint::init(inWeakPtr);
}
};
} // namespace io
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment