Aggiustato cambio direzione texture
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user