Caricamento v4
This commit is contained in:
@@ -29,16 +29,18 @@ sf::Shape* Caviglia::draw(ReferencePlane plane){
|
||||
case ReferencePlane::XZ:
|
||||
{
|
||||
sf::Shape* shape = shapeXZ;
|
||||
shape->setRotation(sf::Angle(sf::radians(tmpRot[2])));
|
||||
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]))});
|
||||
return shape;}
|
||||
break;
|
||||
|
||||
case ReferencePlane::YZ:
|
||||
{
|
||||
sf::Shape* shape = shapeYZ;
|
||||
shape->setRotation(sf::Angle(sf::radians(tmpRot[1])));
|
||||
shape->setRotation(sf::Angle(sf::radians(tmpRot[0])));
|
||||
shape->setPosition({tmpPos[1]+globalPos[1],tmpPos[2]+globalPos[2]});
|
||||
shape->setScale({1,cos(float(tmpRot[1]))});
|
||||
return shape;}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user