Aggiustato cambio direzione texture

This commit is contained in:
2026-06-22 18:37:19 +02:00
parent 818677f831
commit 4e763fc2af
5 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -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<std::vector<float>> accData;
+2 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1
View File
@@ -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;