ARGoS 3
A parallel, multi-engine simulator for swarm robotics
dynamics2d_stretchable_object_model.h
Go to the documentation of this file.
1
7#ifndef DYNAMICS2D_STRETCHABLE_OBJECT_MODEL_H
8#define DYNAMICS2D_STRETCHABLE_OBJECT_MODEL_H
9
10namespace argos {
11 class CDynamics2DGrippable;
12 class CDynamics2DStretchableObjectModel;
13}
14
15#include <argos3/plugins/simulator/physics_engines/dynamics2d/dynamics2d_single_body_object_model.h>
16
17namespace argos {
18
19 /****************************************/
20 /****************************************/
21
33
34 public:
35
37 CComposableEntity& c_entity);
38
40
41 virtual void MoveTo(const CVector3& c_position,
42 const CQuaternion& c_orientation);
43
44 virtual void Reset();
45
46 virtual void UpdateFromEntityStatus() {}
47
48 inline Real GetMass() const {
49 return m_fMass;
50 }
51
52 inline void SetMass(Real f_mass) {
53 m_fMass = f_mass;
54 }
55
57 return m_pcGrippable;
58 }
59
60 inline void SetGrippable(CDynamics2DGrippable* pc_grippable) {
61 m_pcGrippable = pc_grippable;
62 }
63
68 void SetLinearFriction(Real f_max_bias,
69 Real f_max_force);
70
75 void SetAngularFriction(Real f_max_bias,
76 Real f_max_force);
77
78 private:
79
80 Real m_fMass;
81 CDynamics2DGrippable* m_pcGrippable;
82 cpConstraint* m_ptLinearFriction;
83 cpConstraint* m_ptAngularFriction;
84 };
85
86 /****************************************/
87 /****************************************/
88
89}
90
91#endif
float Real
Collects all ARGoS code.
Definition datatypes.h:39
The namespace containing all the ARGoS related code.
Definition ci_actuator.h:12
Basic class for an entity that contains other entities.
A 3D vector class.
Definition vector3.h:31
Base class for object models with a single body.
A stretchable and grippable object model for the dynamics 2D engine.
virtual void MoveTo(const CVector3 &c_position, const CQuaternion &c_orientation)
CDynamics2DStretchableObjectModel(CDynamics2DEngine &c_engine, CComposableEntity &c_entity)
void SetLinearFriction(Real f_max_bias, Real f_max_force)
Sets the linear friction of this object.
void SetGrippable(CDynamics2DGrippable *pc_grippable)
virtual void UpdateFromEntityStatus()
Updates the state of this model from the status of the associated entity.
void SetAngularFriction(Real f_max_bias, Real f_max_force)
Sets the angular friction of this object.