Aggiustata direzione texture su YZ

This commit is contained in:
2026-06-22 19:01:14 +02:00
parent d2a0256a3e
commit 276e00aee1
4 changed files with 4 additions and 2 deletions
Binary file not shown.
+1 -1
View File
@@ -49,7 +49,7 @@ sf::Shape* Caviglia::draw(ReferencePlane plane){
sf::Shape* shape = shapeYZ; sf::Shape* shape = shapeYZ;
shape->setRotation(sf::Angle(sf::radians(tmpRot[0]))); shape->setRotation(sf::Angle(sf::radians(tmpRot[0])));
shape->setPosition({tmpPos[1]+globalPos[1],tmpPos[2]+globalPos[2]}); shape->setPosition({tmpPos[1]+globalPos[1],tmpPos[2]+globalPos[2]});
shape->setScale({1,cos(float(tmpRot[1]))}); shape->setScale({direction == Direction::R ? float(1.0) : float(-1.0),cos(float(tmpRot[1]))});
shape->setFillColor(color*sf::Color(255,255,255,transparency*255)); shape->setFillColor(color*sf::Color(255,255,255,transparency*255));
return shape;} return shape;}
break; break;
+1 -1
View File
@@ -48,7 +48,7 @@ sf::Shape* Coscia::draw(ReferencePlane plane){
shape->setRotation(sf::Angle(sf::radians(tmpRot[0]))); shape->setRotation(sf::Angle(sf::radians(tmpRot[0])));
shape->setPosition({tmpPos[1]+globalPos[1],tmpPos[2]+globalPos[2]}); shape->setPosition({tmpPos[1]+globalPos[1],tmpPos[2]+globalPos[2]});
shape->setFillColor(color*sf::Color(255,255,255,transparency*255)); shape->setFillColor(color*sf::Color(255,255,255,transparency*255));
shape->setScale({1,cos(float(tmpRot[1]))}); shape->setScale({direction == Direction::R ? float(1.0) : float(-1.0),cos(float(tmpRot[1]))});
return shape;} return shape;}
break; break;
+2
View File
@@ -76,6 +76,7 @@ sf::Shape* Sensore::draw(ReferencePlane plane){
shape->setRotation(sf::Angle(sf::radians(tmpRot[1]))); shape->setRotation(sf::Angle(sf::radians(tmpRot[1])));
shape->setPosition({tmpPos[0]+globalPos[0],tmpPos[2]+globalPos[2]}); shape->setPosition({tmpPos[0]+globalPos[0],tmpPos[2]+globalPos[2]});
shape->setFillColor(color*sf::Color(255,255,255,transparency*255)); shape->setFillColor(color*sf::Color(255,255,255,transparency*255));
shape->setScale({plane == ReferencePlane::XZ ? float(1.0) : float(-1.0),1});
return shape;} return shape;}
break; break;
@@ -85,6 +86,7 @@ sf::Shape* Sensore::draw(ReferencePlane plane){
shape->setRotation(sf::Angle(sf::radians(tmpRot[0]))); shape->setRotation(sf::Angle(sf::radians(tmpRot[0])));
shape->setPosition({tmpPos[1]+globalPos[1],tmpPos[2]+globalPos[2]}); shape->setPosition({tmpPos[1]+globalPos[1],tmpPos[2]+globalPos[2]});
shape->setFillColor(color*sf::Color(255,255,255,transparency*255)); shape->setFillColor(color*sf::Color(255,255,255,transparency*255));
shape->setScale({direction == Direction::R ? float(1.0) : float(-1.0),1});
return shape;} return shape;}
break; break;