16 #ifndef SURGSIM_PHYSICS_RIGIDREPRESENTATIONBASE_H 17 #define SURGSIM_PHYSICS_RIGIDREPRESENTATIONBASE_H 69 void setDensity(
double rho);
73 double getDensity()
const;
77 double getMass()
const;
89 void setLinearDamping(
double linearDamping);
93 double getLinearDamping()
const;
97 void setAngularDamping(
double angularDamping);
101 double getAngularDamping()
const;
106 void setShape(
const std::shared_ptr<SurgSim::Math::Shape> shape);
110 const std::shared_ptr<SurgSim::Math::Shape> getShape()
const;
117 virtual void setCollisionRepresentation(
118 std::shared_ptr<SurgSim::Collision::Representation> representation)
override;
120 virtual void beforeUpdate(
double dt)
override;
121 virtual void afterUpdate(
double dt)
override;
124 virtual bool doInitialize()
override;
125 virtual bool doWakeUp()
override;
158 std::shared_ptr<SurgSim::Math::Shape>
m_shape;
169 void updateProperties();
179 #endif // SURGSIM_PHYSICS_RIGIDREPRESENTATIONBASE_H double m_angularDamping
Angular damping parameter (in N.m.s.rad-1)
Definition: RigidRepresentationBase.h:149
Definition: DriveElementFromInputBehavior.cpp:27
std::shared_ptr< SurgSim::Math::Shape > m_shape
Shape to be used for the mass/inertia calculation.
Definition: RigidRepresentationBase.h:158
RigidRepresentationState m_finalState
Last valid/final rigid representation state.
Definition: RigidRepresentationBase.h:134
SurgSim::Math::Matrix33d m_localInertia
Inertia matrix in local coordinates.
Definition: RigidRepresentationBase.h:155
The Representation class defines the base class for all physics objects.
Definition: Representation.h:56
Definition: Location.h:31
RigidRepresentationState m_initialState
Initial rigid representation state (useful for reset)
Definition: RigidRepresentationBase.h:128
string(TOUPPER ${DEVICE}DEVICE_UPPER_CASE) option(BUILD_DEVICE_ $
Definition: CMakeLists.txt:35
The RigidRepresentationBase class defines the base class for all rigid motion based representations (...
Definition: RigidRepresentationBase.h:38
double m_mass
Total mass of the object (in Kg)
Definition: RigidRepresentationBase.h:143
double m_rho
Density of the object (in Kg.m-3)
Definition: RigidRepresentationBase.h:140
RigidRepresentationState m_currentState
Current rigid representation state.
Definition: RigidRepresentationBase.h:132
bool m_parametersValid
Validity of the parameters.
Definition: RigidRepresentationBase.h:137
double m_linearDamping
Linear damping parameter (in N.s.m-1 or Kg.s-1)
Definition: RigidRepresentationBase.h:146
SurgSim::Math::Vector3d m_massCenter
Mass-center of the object.
Definition: RigidRepresentationBase.h:152
Eigen::Matrix< double, 3, 3, Eigen::RowMajor > Matrix33d
A 3x3 matrix of doubles.
Definition: Matrix.h:51
Eigen::Matrix< double, 3, 1 > Vector3d
A 3D vector of doubles.
Definition: Vector.h:56
The RigidRepresentationState class describes a state (position and velocity information).
Definition: RigidRepresentationState.h:31
RigidRepresentationState m_previousState
Previous rigid representation state.
Definition: RigidRepresentationBase.h:130