public static AxisAlignedCubeSave FromAxisAlignedCube(FlatRedBall.Math.Geometry.AxisAlignedCube cube)
        {
            AxisAlignedCubeSave aacs = new AxisAlignedCubeSave();

            aacs.X = cube.X;
            aacs.Y = cube.Y;
            aacs.Z = cube.Z;

            aacs.ScaleX = cube.ScaleX;
            aacs.ScaleY = cube.ScaleY;
            aacs.ScaleZ = cube.ScaleZ;

            aacs.Name = cube.Name;

            if (cube.Parent != null)
            {
                aacs.Parent = cube.Parent.Name;
            }

            aacs.Alpha = cube.Color.A / 255.0f;
            aacs.Red   = cube.Color.R / 255.0f;
            aacs.Green = cube.Color.G / 255.0f;
            aacs.Blue  = cube.Color.B / 255.0f;

            return(aacs);
        }
        public FlatRedBall.Math.Geometry.AxisAlignedCube ToAxisAlignedCube()
        {
            FlatRedBall.Math.Geometry.AxisAlignedCube cube = new FlatRedBall.Math.Geometry.AxisAlignedCube();

            cube.X = this.X;
            cube.Y = this.Y;
            cube.Z = this.Z;

            cube.ScaleX = this.ScaleX;
            cube.ScaleY = this.ScaleY;
            cube.ScaleZ = this.ScaleZ;

            cube.Name = this.Name;

            cube.Color =
#if FRB_MDX
                Color.FromArgb(
                (int)(Alpha * 255),
                (int)(Red * 255),
                (int)(Green * 255),
                (int)(Blue * 255));
#else
                 new Color(
                    (byte)(Red * 255),
                    (byte)(Green * 255),
                    (byte)(Blue * 255),
                    (byte)(Alpha * 255));
#endif

            return cube;

        }
        public FlatRedBall.Math.Geometry.AxisAlignedCube ToAxisAlignedCube()
        {
            FlatRedBall.Math.Geometry.AxisAlignedCube cube = new FlatRedBall.Math.Geometry.AxisAlignedCube();

            cube.X = this.X;
            cube.Y = this.Y;
            cube.Z = this.Z;

            cube.ScaleX = this.ScaleX;
            cube.ScaleY = this.ScaleY;
            cube.ScaleZ = this.ScaleZ;

            cube.Name = this.Name;

            cube.Color =
                new Color(
                    (byte)(Red * 255),
                    (byte)(Green * 255),
                    (byte)(Blue * 255),
                    (byte)(Alpha * 255));

            return(cube);
        }