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);
		}
	}
예제 #2
0
Vector3 Transform::getWorldPosition() const
{
	return getAbsoluteTransform() * getPosition();
}
예제 #3
0
BoundingBox Transform::getWorldBoundingVolume() const
{
	const Matrix4x3& transform = getAbsoluteTransform();
	return bounds.transform(transform);
}