Add locking mechanism to prevent updating transform/parent
This commit is contained in:
@@ -17,8 +17,8 @@ CSG::CSG(OperationType operation, Shape *left, Shape *right) : Shape(Shape::CSG)
|
||||
{
|
||||
stats.addCsg();
|
||||
|
||||
this->left->parent = this;
|
||||
this->right->parent = this;
|
||||
this->left->setParent(this);
|
||||
this->right->setParent(this);
|
||||
|
||||
this->bounds | this->left->getBounds();
|
||||
this->bounds | this->right->getBounds();
|
||||
@@ -134,6 +134,19 @@ void CSG::filterIntersections(Intersect &xs, Intersect &ret)
|
||||
}
|
||||
}
|
||||
|
||||
void CSG::lock()
|
||||
{
|
||||
Shape::lock();
|
||||
if(this->left)
|
||||
{
|
||||
this->left->lock();
|
||||
}
|
||||
if(this->right)
|
||||
{
|
||||
this->right->lock();
|
||||
}
|
||||
}
|
||||
|
||||
void CSG::dumpMe(FILE *fp)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user