void SimpleSceneGraph::updateSuccessor(Entity& entity) { // Update the entities to match the updated graph. Matrix44 absoluteTransform = getAbsoluteTransform(); for (Entity* myEntity : entities) { myEntity->setTransform(absoluteTransform); } for (unsigned int index = 0; index < children.size(); index++) { children[index]->updateSuccessor(entity); } }
Vector3 Transform::getWorldPosition() const { return getAbsoluteTransform() * getPosition(); }
BoundingBox Transform::getWorldBoundingVolume() const { const Matrix4x3& transform = getAbsoluteTransform(); return bounds.transform(transform); }