Fix an issue with groups, and add Chapter 14 example!
This commit is contained in:
@@ -136,4 +136,32 @@ void Group::updateBoundingBox()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Group::updateTransform()
|
||||
{
|
||||
int i;
|
||||
|
||||
Shape::updateTransform();
|
||||
if (this->objectCount > 0)
|
||||
{
|
||||
for (i = 0 ; i < this->objectCount ; i++)
|
||||
{
|
||||
this->objectList[i]->updateTransform();
|
||||
}
|
||||
}
|
||||
|
||||
/* We are force to do them all the time */
|
||||
if (this->unboxableObjectCount > 0)
|
||||
{
|
||||
for(i = 0; i < this->unboxableObjectCount; i++)
|
||||
{
|
||||
this->unboxableObjectList[i]->updateTransform();
|
||||
}
|
||||
}
|
||||
|
||||
/* Once the full stack being notified of the changes, let's update the
|
||||
* bounding box
|
||||
*/
|
||||
this->updateBoundingBox();
|
||||
}
|
||||
Reference in New Issue
Block a user