Exemplo n.º 1
0
        public static SpaceMatrices Create(Transform transform)
        {
            SpaceMatrices spaceMatrices = new SpaceMatrices();

            if (transform == null ||
                Tools.pivotRotation == PivotRotation.Global)
            {
                return(spaceMatrices);
            }

            spaceMatrices.activeLocalToWorld = transform.localToWorldMatrix;
            spaceMatrices.activeWorldToLocal = transform.worldToLocalMatrix;

            var model = InternalCSGModelManager.FindModelTransform(transform);

            if (model != null)
            {
                spaceMatrices.modelLocalToWorld = model.localToWorldMatrix;
                spaceMatrices.modelWorldToLocal = model.worldToLocalMatrix;
            }

            return(spaceMatrices);
        }
Exemplo n.º 2
0
        public void UpdateTransforms(CSGBrush brush)
        {
            BrushTransform = brush.GetComponent <Transform>();
            ModelTransform = InternalCSGModelManager.FindModelTransform(BrushTransform);
//			ParentTransform = InternalCSGModelManager.FindParentTransform(BrushTransform);
        }