diff --git a/build/bin/mainV10.exe b/build/bin/mainV10.exe index 4d2dc44..3fd404f 100644 Binary files a/build/bin/mainV10.exe and b/build/bin/mainV10.exe differ diff --git a/src/pieces/headers/sensore.hpp b/src/pieces/headers/sensore.hpp index 0191993..e0d464f 100644 --- a/src/pieces/headers/sensore.hpp +++ b/src/pieces/headers/sensore.hpp @@ -7,7 +7,7 @@ class Sensore : public PieceInterface{ private: - const sf::Vector3f sensore_Dim = {30, 60, 30}; + const sf::Vector3f sensore_Dim = {15, 20, 15}; const sf::Color sensore_Col = sf::Color::Red; std::vector> accData; diff --git a/src/pieces/methods/caviglia_class.cpp b/src/pieces/methods/caviglia_class.cpp index 787a4c3..78781b6 100644 --- a/src/pieces/methods/caviglia_class.cpp +++ b/src/pieces/methods/caviglia_class.cpp @@ -38,8 +38,9 @@ sf::Shape* Caviglia::draw(ReferencePlane plane){ sf::Shape* shape = shapeXZ; shape->setRotation(sf::Angle(sf::radians(tmpRot[1]))); shape->setPosition({tmpPos[0]+globalPos[0],tmpPos[2]+globalPos[2]}); - shape->setScale({1,cos(float(tmpRot[0]))}); + shape->setScale({plane == ReferencePlane::XZ ? float(1.0) : float(-1.0),cos(float(tmpRot[0]))}); shape->setFillColor(color*sf::Color(255,255,255,transparency*255)); + return shape;} break; diff --git a/src/pieces/methods/coscia_class.cpp b/src/pieces/methods/coscia_class.cpp index e408fc3..716e030 100644 --- a/src/pieces/methods/coscia_class.cpp +++ b/src/pieces/methods/coscia_class.cpp @@ -37,7 +37,7 @@ sf::Shape* Coscia::draw(ReferencePlane plane){ sf::Shape* shape = shapeXZ; shape->setRotation(sf::Angle(sf::radians(tmpRot[1]))); shape->setPosition({tmpPos[0]+globalPos[0],tmpPos[2]+globalPos[2]}); - shape->setScale({1,cos(float(tmpRot[0]))}); + shape->setScale({plane == ReferencePlane::XZ ? float(1.0) : float(-1.0),cos(float(tmpRot[0]))}); shape->setFillColor(color*sf::Color(255,255,255,transparency*255)); return shape;} break; diff --git a/src/pieces/methods/torso.cpp b/src/pieces/methods/torso.cpp index 47b31a4..092f167 100644 --- a/src/pieces/methods/torso.cpp +++ b/src/pieces/methods/torso.cpp @@ -38,6 +38,7 @@ sf::Shape* Torso::draw(ReferencePlane plane){ sf::Shape* shape = shapeXZ; shape->setRotation(sf::Angle(sf::radians(tmpRot[1]))); shape->setPosition({tmpPos[0]+globalPos[0],tmpPos[2]+globalPos[2]}); + shape->setScale({plane == ReferencePlane::XZ ? float(1.0) : float(-1.0),cos(float(tmpRot[0]))}); shape->setFillColor(color*sf::Color(255,255,255,transparency*255)); return shape;} break;