Example #1
0
        public OBB3(FastBounds localBounds, Matrix4x4 modelMatrix)
        {
            this.localBounds = localBounds;

            this.modelMatrix   = modelMatrix;
            this.modelITMatrix = modelMatrix.inverse.transpose;

            this.worldBounds = localBounds.EncapsulateInTargetSpace(modelMatrix);
        }
Example #2
0
        public static FastBounds EncapsulateInWorldSpace(this Transform tr, FastBounds local)
        {
            var local2world = tr.localToWorldMatrix;

            return(local.EncapsulateInTargetSpace(local2world));
        }