Aggiunto cambio direzione per corretta visualizzaione dx/sx

This commit is contained in:
2026-06-19 19:04:28 +02:00
parent a16cc97048
commit fa6d6cf76e
7 changed files with 30 additions and 8 deletions
+1
View File
@@ -13,6 +13,7 @@ class Gamba : public CollectionInterface {
Gamba(rb::Vector3 pos, unsigned int* dataPos, std::string cosciaData, std::string cavigliaData);
collection create(ReferencePlane plane) override;
PieceInterface* getJointPiece();
void setDirection(Direction dir);
};
#endif
+9
View File
@@ -47,4 +47,13 @@ collection Gamba::create(ReferencePlane plane){
PieceInterface* Gamba::getJointPiece(){
return sensori[0];
}
void Gamba::setDirection(Direction dir){
for (auto i : pezzi){
i->setDirection(dir);
}
for (auto i : sensori){
i->setDirection(dir);
}
}
+2
View File
@@ -21,10 +21,12 @@ collection Lower_Body::create(ReferencePlane plane){
switch (plane)
{
case ReferencePlane::XZ: case ReferencePlane::XZN:
dx->setDirection(Direction::R);
coll = coll + sx->create(plane);
coll = coll + dx->create(plane);
break;
case ReferencePlane::YZ:
dx->setDirection(Direction::L);
coll = coll + dx->create(plane);
coll = coll + sx->create(plane);
break;