Exemple #1
0
 public void AddSphereList(PositionedObjectList <Sphere> spheresToAdd)
 {
     foreach (Sphere sphere in spheresToAdd)
     {
         SphereSave sphereSave = SphereSave.FromSphere(sphere);
         SphereSaves.Add(sphereSave);
     }
 }
Exemple #2
0
        public static SphereSave FromSphere(FlatRedBall.Math.Geometry.Sphere sphere)
        {
            SphereSave sphereSave = new SphereSave();
            sphereSave.X = sphere.X;
            sphereSave.Y = sphere.Y;
            sphereSave.Z = sphere.Z;

            sphereSave.Radius = sphere.Radius;

            sphereSave.Name = sphere.Name;

            if (sphere.Parent != null)
            {
                sphereSave.Parent = sphere.Parent.Name;
            }

            sphereSave.Alpha = sphere.Color.A / 255.0f;
            sphereSave.Red = sphere.Color.R / 255.0f;
            sphereSave.Green = sphere.Color.G / 255.0f;
            sphereSave.Blue = sphere.Color.B / 255.0f;

            return sphereSave;
        }
Exemple #3
0
        public static SphereSave FromSphere(FlatRedBall.Math.Geometry.Sphere sphere)
        {
            SphereSave sphereSave = new SphereSave();

            sphereSave.X = sphere.X;
            sphereSave.Y = sphere.Y;
            sphereSave.Z = sphere.Z;

            sphereSave.Radius = sphere.Radius;

            sphereSave.Name = sphere.Name;

            if (sphere.Parent != null)
            {
                sphereSave.Parent = sphere.Parent.Name;
            }

            sphereSave.Alpha = sphere.Color.A / 255.0f;
            sphereSave.Red   = sphere.Color.R / 255.0f;
            sphereSave.Green = sphere.Color.G / 255.0f;
            sphereSave.Blue  = sphere.Color.B / 255.0f;

            return(sphereSave);
        }