コード例 #1
0
	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);
}