Aggiuto controllo trasparenza nelle collezioni
This commit is contained in:
@@ -13,6 +13,7 @@ struct collection{
|
|||||||
class CollectionInterface{
|
class CollectionInterface{
|
||||||
public:
|
public:
|
||||||
virtual collection create(ReferencePlane plane) = 0;
|
virtual collection create(ReferencePlane plane) = 0;
|
||||||
|
virtual bool setTransparency(float alpha) = 0;
|
||||||
virtual ~CollectionInterface(){};
|
virtual ~CollectionInterface(){};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class Gamba : public CollectionInterface {
|
|||||||
collection create(ReferencePlane plane) override;
|
collection create(ReferencePlane plane) override;
|
||||||
PieceInterface* getJointPiece();
|
PieceInterface* getJointPiece();
|
||||||
void setDirection(Direction dir);
|
void setDirection(Direction dir);
|
||||||
|
bool setTransparency(float alpha) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -28,7 +28,7 @@ public:
|
|||||||
~Lower_Body();
|
~Lower_Body();
|
||||||
|
|
||||||
void setVisibility(bool c);
|
void setVisibility(bool c);
|
||||||
void setTransparency(float t);
|
bool setTransparency(float alpha) override;
|
||||||
collection create(ReferencePlane plane) override;
|
collection create(ReferencePlane plane) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -57,3 +57,13 @@ void Gamba::setDirection(Direction dir){
|
|||||||
i->setDirection(dir);
|
i->setDirection(dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Gamba::setTransparency(float alpha){
|
||||||
|
for (auto i : pezzi){
|
||||||
|
if (!i->setTransparency(alpha)) return false;
|
||||||
|
}
|
||||||
|
for (auto i : sensori){
|
||||||
|
if (!i->setTransparency(alpha)) return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -53,3 +53,10 @@ Lower_Body::~Lower_Body(){
|
|||||||
void Lower_Body::setVisibility(bool c){
|
void Lower_Body::setVisibility(bool c){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Lower_Body::setTransparency(float alpha){
|
||||||
|
if (!sx->setTransparency(alpha)) return false;
|
||||||
|
dx->setTransparency(alpha);
|
||||||
|
t->setTransparency(alpha);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user