예제 #1
0
        private void AddItem(TransformationComponent item)
        {
            if (item.Parent != null)
            {
                throw new InvalidOperationException("This TransformationComponent already has a Parent, detach it first.");
            }

            item.parent = this;
        }
예제 #2
0
        private void RemoveItem(TransformationComponent item)
        {
            if (item.Parent != this)
            {
                throw new InvalidOperationException("This TransformationComponent's parent is not the expected value.");
            }

            item.parent = null;
        }
예제 #3
0
 private static void UpdateTransformation(TransformationComponent transformation)
 {
     // Update transformation
     transformation.UpdateLocalMatrix();
     transformation.UpdateWorldMatrixNonRecursive();
 }