An anchor related to the body of an entity. More...
#include <physics_model.h>
Public Member Functions | |
SAnchor (CEmbodiedEntity &c_body, const std::string &str_id, UInt32 un_index, const CVector3 &c_offset_position, const CQuaternion &c_offset_orientation, const CVector3 &c_position, const CQuaternion &c_orientation) | |
Struct constructor. More... | |
void | Enable () |
Enables this anchor. More... | |
void | Disable () |
Disables this anchor. More... | |
Public Attributes | |
CEmbodiedEntity & | Body |
The embodied entity that owns this anchor. More... | |
std::string | Id |
The id of the anchor. More... | |
UInt32 | Index |
The index of the anchor assigned by the embodied entity. More... | |
CVector3 | OffsetPosition |
The initial position of the anchor wrt the body coordinate system. More... | |
CQuaternion | OffsetOrientation |
The initial orientation of the anchor wrt the body coordinate system. More... | |
CVector3 | Position |
The position of the anchor wrt the global coordinate system. More... | |
CQuaternion | Orientation |
The orientation of the anchor wrt the global coordinate system. More... | |
UInt32 | InUseCount |
A counter for the devices using this anchor. More... | |
An anchor related to the body of an entity.
Anchors are used by entities as reference points. For instance, an LED ring could use an anchor as the center of the ring. As the anchor moves in the space, the LED positions would be calculated with respect to it. An anchor is always initially disabled. To use it, you must first enable it.
Definition at line 38 of file physics_model.h.
argos::SAnchor::SAnchor | ( | CEmbodiedEntity & | c_body, |
const std::string & | str_id, | ||
UInt32 | un_index, | ||
const CVector3 & | c_offset_position, | ||
const CQuaternion & | c_offset_orientation, | ||
const CVector3 & | c_position, | ||
const CQuaternion & | c_orientation | ||
) |
Struct constructor.
Initializes the anchor using the provided information. InUseCount is initialized to 0, i.e., the anchor is initially disabled.
str_id | The id of the anchor. |
c_offset_position | The position of the anchor wrt the body coordinate system. |
c_offset_orientation | The orientation of the anchor wrt the body coordinate system. |
Definition at line 10 of file physics_model.cpp.
void argos::SAnchor::Disable | ( | ) |
Disables this anchor.
Definition at line 37 of file physics_model.cpp.
void argos::SAnchor::Enable | ( | ) |
Enables this anchor.
Definition at line 30 of file physics_model.cpp.
CEmbodiedEntity& argos::SAnchor::Body |
The embodied entity that owns this anchor.
Definition at line 40 of file physics_model.h.
std::string argos::SAnchor::Id |
The id of the anchor.
Definition at line 42 of file physics_model.h.
UInt32 argos::SAnchor::Index |
The index of the anchor assigned by the embodied entity.
Indices are used for fast lookup of anchor methods in physics engines.
Definition at line 45 of file physics_model.h.
UInt32 argos::SAnchor::InUseCount |
A counter for the devices using this anchor.
Definition at line 55 of file physics_model.h.
CQuaternion argos::SAnchor::OffsetOrientation |
The initial orientation of the anchor wrt the body coordinate system.
Definition at line 49 of file physics_model.h.
CVector3 argos::SAnchor::OffsetPosition |
The initial position of the anchor wrt the body coordinate system.
Definition at line 47 of file physics_model.h.
CQuaternion argos::SAnchor::Orientation |
The orientation of the anchor wrt the global coordinate system.
Definition at line 53 of file physics_model.h.
CVector3 argos::SAnchor::Position |
The position of the anchor wrt the global coordinate system.
Definition at line 51 of file physics_model.h.