Aggiustata direzione texture su YZ
This commit is contained in:
Binary file not shown.
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user