Aggiuto controllo trasparenza nelle collezioni
This commit is contained in:
@@ -13,6 +13,7 @@ struct collection{
|
||||
class CollectionInterface{
|
||||
public:
|
||||
virtual collection create(ReferencePlane plane) = 0;
|
||||
virtual bool setTransparency(float alpha) = 0;
|
||||
virtual ~CollectionInterface(){};
|
||||
};
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ class Gamba : public CollectionInterface {
|
||||
collection create(ReferencePlane plane) override;
|
||||
PieceInterface* getJointPiece();
|
||||
void setDirection(Direction dir);
|
||||
bool setTransparency(float alpha) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
~Lower_Body();
|
||||
|
||||
void setVisibility(bool c);
|
||||
void setTransparency(float t);
|
||||
bool setTransparency(float alpha) override;
|
||||
collection create(ReferencePlane plane) override;
|
||||
};
|
||||
|
||||
|
||||
@@ -56,4 +56,14 @@ void Gamba::setDirection(Direction dir){
|
||||
for (auto i : sensori){
|
||||
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;
|
||||
}
|
||||
@@ -52,4 +52,11 @@ Lower_Body::~Lower_Body(){
|
||||
|
||||
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