Add Marionette

This commit was merged in pull request #1.
This commit is contained in:
2025-07-22 02:03:09 -04:00
parent 336094ef90
commit e7974db324
11 changed files with 131 additions and 44 deletions
+21 -19
View File
@@ -1,11 +1,14 @@
#ifndef BODY_MESSAGE_H
#define BODY_MESSAGE_H
#ifndef MRNTT_BODY_BODYMESSAGE_H
#define MRNTT_BODY_BODYMESSAGE_H
#include <vector>
#include <cstdint>
#include <body/limb.h>
#include <body/bodyPart.h>
#include <body/part.h>
namespace mrntt {
namespace body {
class BodyMessage
{
@@ -14,7 +17,7 @@ public:
~BodyMessage() = default;
};
class BodySpotImpactEntry
class SpotImpactEntry
{
public:
enum class ReportType
@@ -26,10 +29,10 @@ public:
COLD
};
BodySpotImpactEntry(uint32_t _spot, ReportType _type, uint32_t _value)
SpotImpactEntry(uint32_t _spot, ReportType _type, uint32_t _value)
: spot(_spot), type(_type), value(_value)
{}
~BodySpotImpactEntry() = default;
~SpotImpactEntry() = default;
public:
uint32_t spot;
@@ -37,28 +40,27 @@ public:
uint32_t value;
};
class BodySpotImpactInd
: public BodyMessage
class SpotImpactInd : public BodyMessage
{
public:
BodySpotImpactInd(BodyPart &_part) : part(_part) {}
~BodySpotImpactInd() = default;
SpotImpactInd(Part &_part) : part(_part) {}
~SpotImpactInd() = default;
public:
BodyPart &part;
std::vector<BodySpotImpactEntry> entries;
Part &part;
std::vector<SpotImpactEntry> entries;
};
class BodyPartMsg
: public BodyMessage
class PartMsg : public BodyMessage
{
public:
BodyPartMsg(const BodyPart& _part)
:part(_part)
{}
PartMsg(const Part& _part) : part(_part) {}
public:
const BodyPart& part;
const Part& part;
};
#endif // BODY_MESSAGE_H
} // namespace body
} // namespace mrntt
#endif // MRNTT_BODY_BODYMESSAGE_H