Ejemplo n.º 1
0
        private void TransformObj(GraphicsObject gObj, Matrix4 transMatrix)
        {
            Vertex v, n;

            for (int i = 0; i < gObj.vertices.Count; i++)
            {
                v = gObj.vertices[i];
                graphController.Dehomogenize(Vector4.Transform(graphController.Homogenize(gObj.vertices[i]), transMatrix), ref v);
                gObj.vertices[i] = v;
            }

            for (int i = 0; i < gObj.normals.Count; i++)
            {
                n = gObj.normals[i];
                graphController.Dehomogenize(Vector4.Transform(graphController.Homogenize(gObj.normals[i]), transMatrix), ref n);
                Normalize(n);
                gObj.normals[i] = n;
            }
        }
    void Awake()
    {
        rigidbody = GetComponent <Rigidbody> ();

        if (colors.Length > 0)
        {
            if (GraphicsObject.GetComponent <MeshRenderer>())
            {
                GraphicsObject.GetComponent <MeshRenderer>().material.color = colors[i];
            }

            if (GraphicsObject.GetComponent <SkinnedMeshRenderer>())
            {
                GraphicsObject.GetComponent <SkinnedMeshRenderer>().material.color = colors[i];
            }

            i++;
            if (i > colors.Length - 1)
            {
                i = 0;
            }


            if (GraphicsObject2)
            {
                if (GraphicsObject2.GetComponent <MeshRenderer>())
                {
                    GraphicsObject2.GetComponent <MeshRenderer>().material.color = colors[i2];
                }

                if (GraphicsObject2.GetComponent <SkinnedMeshRenderer>())
                {
                    GraphicsObject2.GetComponent <SkinnedMeshRenderer>().material.color = colors[i2];
                }

                i2++;
                if (i2 > colors.Length - 1)
                {
                    i2 = 0;
                }
            }
        }
    }
Ejemplo n.º 3
0
    void Start()
    {
        anim = GraphicsObject.GetComponent <Animation>();
        //anim.Play("chell.qc_skeleton|a_idle_portalgun");
        anim.Play("chell.qc_skeleton|a_idle_portalgun");

        cam = Camera.main;
        if (lockCursor)
        {
            Cursor.lockState = CursorLockMode.Locked;
            Cursor.visible   = false;
        }

        controller = GetComponent <CharacterController> ();

        yaw         = transform.eulerAngles.y;
        pitch       = cam.transform.localEulerAngles.x;
        smoothYaw   = yaw;
        smoothPitch = pitch;
    }
Ejemplo n.º 4
0
 protected override void OnPaint(PaintEventArgs e)
 {
     _graphics = e.Graphics;
     DrawField();
     if (_list.Count == 2)
     {
         _graphicsObject = new GraphicsObject(e.Graphics, new Point(100, 100), _list[0].Points);
         _graphicsObject = new GraphicsObject(e.Graphics, new Point(300, 100), _list[1].Points);
     }
     else if (_list.Count == 1)
     {
         _graphicsObject = new GraphicsObject(e.Graphics, new Point(100, 100), _list[0].Points);
     }
     else
     {
         _graphicsObject = new GraphicsObject(e.Graphics, new Point(100, 100), _list[0].Points);
         _graphicsObject = new GraphicsObject(e.Graphics, new Point(300, 100), _list[1].Points);
         _graphicsObject = new GraphicsObject(e.Graphics, new Point(500, 100), _list[2].Points);
         _graphicsObject = new GraphicsObject(e.Graphics, new Point(700, 100), _list[3].Points);
         _graphicsObject = new GraphicsObject(e.Graphics, new Point(900, 100), _list[4].Points);
     }
 }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            GraphicsController graphCon         = new GraphicsController();
            List <SimObject>   simulatedObjects = new List <SimObject>();
            List <Matrix4>     transList        = new List <Matrix4>();
            PhysicsController  physics          = new PhysicsController();

            /* HANDLE GRAPHICS */
            graphCon.ReadObjFile("sphere.obj");
            graphCon.ReadSkyObjFile("skybox.obj");

            // The Sun
            GraphicsObject sunGraphics = graphCon.CreateGraphicsObj(0);

            // Earth
            GraphicsObject earthGraphics = graphCon.CreateGraphicsObj(0);

            // Mercury
            GraphicsObject mercuryGraphics = graphCon.CreateGraphicsObj(0);

            // Venus
            GraphicsObject venusGraphics = graphCon.CreateGraphicsObj(0);

            // Mars
            GraphicsObject marsGraphics = graphCon.CreateGraphicsObj(0);

            // Jupiter
            GraphicsObject jupiterGraphics = graphCon.CreateGraphicsObj(0);

            // Saturn
            GraphicsObject saturnGraphics = graphCon.CreateGraphicsObj(0);

            /* GFX HANDLING DONE */


            /* HANDLE PHYSICS */
            PhysicsObject sunPhys = new PhysicsObject();

            sunPhys.Mass         = 1.98843 * Math.Pow(10, 30);
            sunPhys.Radius       = 6963420;
            sunPhys.Velocity     = new double[3];
            sunPhys.Acceleration = new double[3];

            PhysicsObject earthPhys = new PhysicsObject();

            earthPhys.Mass         = 5.97223 * Math.Pow(10, 24);
            earthPhys.Radius       = 637100;
            earthPhys.Velocity     = new double[] { 0, 0, 29.78 * 1000 };
            earthPhys.Acceleration = new double[3];

            PhysicsObject mercuryPhys = new PhysicsObject();

            mercuryPhys.Mass         = 3.3022 * Math.Pow(10, 23);
            mercuryPhys.Radius       = 243900.7;
            mercuryPhys.Velocity     = new double[] { 0, 0, 47.362 * 1000 };
            mercuryPhys.Acceleration = new double[3];

            PhysicsObject venusPhys = new PhysicsObject();

            venusPhys.Mass         = 4.8676 * Math.Pow(10, 24);
            venusPhys.Radius       = 605100.8;
            venusPhys.Velocity     = new double[] { 0, 0, 35.02 * 1000 };
            venusPhys.Acceleration = new double[3];

            PhysicsObject marsPhys = new PhysicsObject();

            marsPhys.Mass         = 6.4185 * Math.Pow(10, 23);
            marsPhys.Radius       = 338900.5;
            marsPhys.Velocity     = new double[] { 0, 0, 24.077 * 1000 };
            marsPhys.Acceleration = new double[3];

            PhysicsObject jupiterPhys = new PhysicsObject();

            jupiterPhys.Mass         = 1.8986 * Math.Pow(10, 27);
            jupiterPhys.Radius       = 699110;
            jupiterPhys.Velocity     = new double[] { 0, 0, 13.07 * 1000 };
            jupiterPhys.Acceleration = new double[3];

            PhysicsObject saturnPhys = new PhysicsObject();

            saturnPhys.Mass         = 5.6846 * Math.Pow(10, 26);
            saturnPhys.Radius       = 602680;
            saturnPhys.Velocity     = new double[] { 0, 0, 9.69 * 1000 };
            saturnPhys.Acceleration = new double[3];

            /* PHYSICS HANDLING DONE*/


            /* PEPARE SIMOBJECTS */

            SimObject sunSim = new SimObject(new double[] { 0, 0, 0 }, sunPhys, sunGraphics);

            sunSim.Scale = new double[] { sunPhys.Radius, sunPhys.Radius, sunPhys.Radius };

            SimObject earthSim = new SimObject(new double[] { 149598261.0, 0, 0 }, earthPhys, earthGraphics);

            earthSim.Scale = new double[] { earthPhys.Radius, earthPhys.Radius, earthPhys.Radius };

            SimObject mercurySim = new SimObject(new double[] { 57909050.0, 0, 0 }, mercuryPhys, mercuryGraphics);

            mercurySim.Scale = new double[] { mercuryPhys.Radius, mercuryPhys.Radius, mercuryPhys.Radius };

            SimObject venusSim = new SimObject(new double[] { 108208000.0, 0, 0 }, venusPhys, venusGraphics);

            venusSim.Scale = new double[] { venusPhys.Radius, venusPhys.Radius, venusPhys.Radius };

            SimObject marsSim = new SimObject(new double[] { 227939100.0, 0, 0 }, marsPhys, marsGraphics);

            marsSim.Scale = new double[] { marsPhys.Radius, marsPhys.Radius, marsPhys.Radius };

            SimObject jupiterSim = new SimObject(new double[] { 778547200.0, 0, 0 }, jupiterPhys, jupiterGraphics);

            jupiterSim.Scale = new double[] { jupiterPhys.Radius, jupiterPhys.Radius, jupiterPhys.Radius };

            SimObject saturnSim = new SimObject(new double[] { 1433449370.0, 0, 0 }, saturnPhys, saturnGraphics);

            saturnSim.Scale = new double[] { saturnPhys.Radius, saturnPhys.Radius, saturnPhys.Radius };

            /* SIMOBJECTS PREPARED */

            /* Setup SimObjList & GraphicsController */
            RenderWindow renderWindow = new RenderWindow(1024, 768, OpenTK.Graphics.GraphicsMode.Default, "Solar Simulation");

            renderWindow.AddDrawObj(sunSim);
            renderWindow.AddDrawObj(earthSim);

            renderWindow.AddDrawObj(mercurySim);
            renderWindow.AddDrawObj(venusSim);
            renderWindow.AddDrawObj(marsSim);
            renderWindow.AddDrawObj(jupiterSim);
            renderWindow.AddDrawObj(saturnSim);
            renderWindow.InitScene();
            renderWindow.Run();
        }
Ejemplo n.º 6
0
        private string ReplaceSuportedObject(string objectName, string objectValue, RowCollectionRow row)
        {
            //
            //  I N F O - ReplaceTagsFromInToOut will not cut this
            //

            Tag2 tag = new Tag2("{=" + objectName + "." + objectValue);

            if (objectName == "date")
            {
                // Call to datetime object
                return(this.DateObject(objectValue));
            }
            else if (objectName == "string")
            {
                // Call to main generic method, other method will call it to get object row value and then format it
                // this one just return pure text value


                //
                //   Ovo sa split je privremeno ovdje stavito
                //
                if (tag.Child.Name.Equals("split"))
                {
                    return(StringObject(row, tag));
                }
                else
                {
                    return(StringObject(row, objectValue));
                }
            }
            else if (objectName == "nth")
            {
                // Call to main generic method, other method will call it to get object row value and then format it
                // this one just return pure text value
                return(NTHObject(row, objectValue));
            }
            else if (objectName == "number")
            {
                // Call to main generic method, other method will call it to get object row value and then format it
                // this one just return pure text value
                return(NumberObject(row, objectValue));
            }
            else if (tag.Name == "input")
            {
                // Call to InputObject
                return(InputObject(row, tag));
            }
            else if (tag.Name == "var")
            {
                // Call to VarObject
                return(VarObject(tag));
            }
            else if (tag.Name == "array")
            {
                // Call to ArrayObject
                ArrayObject arrayObject = new ArrayObject(tag, varObjectList);
                return(arrayObject.ProcessTag());
            }
            else if (tag.Name == "format")
            {
                // Call to FormatObject, get and set method
                return(FormatObject(tag));
            }
            else if (objectName == "xml")
            {
                // Call to FormatObject, get and set method
                return(XMLObject(row, objectValue));
            }
            else if (objectName.StartsWith("random"))
            {
                return(RandomObject(objectName, objectValue));
            }
            else if (objectName.StartsWith("md5"))
            {
                return(MD5Object(objectName, objectValue));
            }
            else if (tag.Name == "file")
            {
                FileObject fileObject = new FileObject(tag, ref varObjectList);
                return(fileObject.ProcessTag());
            }
            else if (tag.Name == "dir")
            {
                DirObject dirObject = new DirObject(tag, ref varObjectList);
                return(dirObject.ProcessTag());
            }
            else if (tag.Name == "graphics")
            {
                GraphicsObject fileObject = new GraphicsObject(tag);
                return(fileObject.ProcessTag());
            }
            else if (tag.Name == "math")
            {
                MathObject mathObject = new MathObject(tag);
                return(mathObject.ProcessTag());
            }
            else
            {
                // objects that dont need be in initialization proccess
                if (isInitialization == false)
                {
                    if (tag.Name == "active")
                    {
                        return(ActiveObject(tag));
                    }
                    else if (tag.Name == "data")
                    {
                        // Call to main generic method, other method will call it to get object row value and then format it
                        // this one just return pure text value
                        return(DataObjectGetValue(row, tag));
                    }
                    //else if (objectName.StartsWith("data"))
                    //{
                    //    return DataObjectGetValue(objectName, objectValue);
                    //}
                    else
                    {
                        return(DataObjectGetValue(tag));
                    }
                }
            }

            return(null);
        }
Ejemplo n.º 7
0
 public SimObject(double[] position, PhysicsObject pObj, GraphicsObject gObj) : this()
 {
     Position    = position;
     PhysicsObj  = pObj;
     GraphicsObj = gObj;
 }
Ejemplo n.º 8
0
        private void SetObjectGraphics(GraphicsObject target, HandleGraphics handleGraphics)
        {
            switch (handleGraphics)
            {
            case HandleGraphics.EnableTarget:
                if (target.renderers != null && target.renderers.Length > 0)
                {
                    for (int i = 0; i < target.renderers.Length; i++)
                    {
                        target.renderers[i].enabled           = true;
                        target.renderers[i].shadowCastingMode = target.originalRenderShadows[i];
                    }
                }

                if (target.Target != null)
                {
                    target.Target.gameObject.SetActive(true);
                }
                break;

            case HandleGraphics.DisableTarget:
                if (target.Target != null)
                {
                    target.Target.gameObject.SetActive(false);
                }
                break;

            case HandleGraphics.EnableRenderers:
                if (target.renderers != null && target.renderers.Length > 0)
                {
                    for (int i = 0; i < target.renderers.Length; i++)
                    {
                        target.renderers[i].enabled           = true;
                        target.renderers[i].shadowCastingMode = target.originalRenderShadows[i];
                    }
                }

                if (target.Target != null)
                {
                    target.Target.gameObject.SetActive(true);
                }
                break;

            case HandleGraphics.DisableRenderers:
                if (target.renderers != null && target.renderers.Length > 0)
                {
                    for (int i = 0; i < target.renderers.Length; i++)
                    {
                        target.renderers[i].enabled = false;
                    }
                }

                if (target.Target != null)
                {
                    target.Target.gameObject.SetActive(true);
                }
                break;

            case HandleGraphics.ShawdosOnly:
                if (target.renderers != null && target.renderers.Length > 0)
                {
                    for (int i = 0; i < target.renderers.Length; i++)
                    {
                        target.renderers[i].enabled           = true;
                        target.renderers[i].shadowCastingMode = ShadowCastingMode.ShadowsOnly;
                    }
                }

                if (target.Target != null)
                {
                    target.Target.gameObject.SetActive(true);
                }
                break;
            }
        }
Ejemplo n.º 9
0
        // Methods
        public PlayingState(ActGame Host, Configuration.IOConfig.KeyboardConfig.PlayerKeyConfig LeftControlConfig, Configuration.IOConfig.KeyboardConfig.PlayerKeyConfig RightControlConfig, LinkedList <TrackSelection>[] Selections)
            : base(Host)
        {
            FighterSpriteSheets      = new SpriteSheet[noPlayers];
            FighterSpriteSheets[atk] = Host.fighterSpriteSheet;
            FighterSpriteSheets[def] = Host.fighterSpriteSheet;

            InitialPositions      = new Vector2[noPlayers];
            InitialPositions[atk] = new Vector2(400, 400);
            InitialPositions[def] = new Vector2(400, 200);

            ValidRects      = new Rectangle[noPlayers];
            ValidRects[atk] = new Rectangle(250, 250, 300, 150);
            ValidRects[def] = new Rectangle(250, 50, 300, 150);

            bullet        = new Bullet();
            bullet.Sprite = Host.bulletSpriteSheet.FrameSprite(0);

            Fighters = new Fighter[noPlayers];
            for (int i = 0; i < noPlayers; ++i)
            {
                Fighters[i]        = new Fighter(Host, ValidRects[i], bullet, RegisterBullet);
                Fighters[i].Sprite = FighterSpriteSheets[i].FrameSprite(0);
            }

            Keyconfigs      = new Configuration.IOConfig.KeyboardConfig.PlayerKeyConfig[noPlayers];
            Keyconfigs[atk] = LeftControlConfig;
            Keyconfigs[def] = RightControlConfig;

            SetActivePlayer(PlayerIndex.One);

            Ps = new ParticleSystem();

            Re = new RhythmEngine(Host.Config);
            Re.SelectionList = Selections;

            Re.LeftPlayer.VisibleRange  = 2000;
            Re.RightPlayer.VisibleRange = 2000;

            Re.LeftPlayer.ShowDebug  = false;
            Re.RightPlayer.ShowDebug = true;

            Rr      = new RhythmRenderer(Re);
            Rr.Font = Host.sysFont;

            Rr.LeftDrawRect  = new Rectangle(8, 8, 192, 350);
            Rr.RightDrawRect = new Rectangle(600, 8, 192, 350);

            LeftController  = Host.LeftController;
            RightController = Host.RightController;

            // TODO: Debug AI
            //LeftController = new AiController(Host.Config.IO.Keyboard.Left.Rhythm.KeyCount, Fighters[atk], Re.players[atk]);
            RightController = new AiController(Host.Config.IO.Keyboard.Right.Rhythm.KeyCount, Fighters[def], Re.players[def]);

            Re.Lock();
            Re.Play();

            Particle particle = new Particle(Host.particle1SpriteSheet);

            GraphicsObject[] FighterGraphicObjs = new GraphicsObject[noPlayers];
            for (int i = 0; i < noPlayers; ++i)
            {
                FighterGraphicObjs[i] = new GraphicsObject(Fighters[i]);
            }

            foreach (GraphicsObject obj in FighterGraphicObjs)
            {
                obj.CreateEmitter(new Vector2(0, 5), 0.15f, -MathHelper.PiOver2, MathHelper.PiOver4, 100, 250, 150, particle, true);
                obj.CreateEmitter(new Vector2(-5, 2), 0.15f, -0.6f * MathHelper.PiOver2, MathHelper.PiOver4 / 2.0f, 50, 250, 150, particle, true);
                obj.CreateEmitter(new Vector2(5, 2), 0.15f, -1.4f * MathHelper.PiOver2, MathHelper.PiOver4 / 2.0f, 50, 250, 150, particle, true);

                Ps.RegisterGraphicsObject(obj);
            }
        }
Ejemplo n.º 10
0
        static void Main(string[] args)
        {
            /* HANDLE PHYSICS */
            PhysicsObject sunPhys = new PhysicsObject();

            sunPhys.Mass         = 1.98843 * Math.Pow(10, 30);
            sunPhys.Radius       = 696342;
            sunPhys.Velocity     = new double[3];
            sunPhys.Acceleration = new double[3];

            PhysicsObject mercuryPhys = new PhysicsObject();

            mercuryPhys.Mass         = 3.3022 * Math.Pow(10, 23);
            mercuryPhys.Radius       = 2439.7;
            mercuryPhys.Velocity     = new double[] { 0, 0, 47.362 * 1000 };
            mercuryPhys.Acceleration = new double[3];

            PhysicsObject venusPhys = new PhysicsObject();

            venusPhys.Mass         = 4.8676 * Math.Pow(10, 24);
            venusPhys.Radius       = 6051.8;
            venusPhys.Velocity     = new double[] { 0, 0, 35.02 * 1000 };
            venusPhys.Acceleration = new double[3];

            PhysicsObject earthPhys = new PhysicsObject();

            earthPhys.Mass         = 5.97223 * Math.Pow(10, 24);
            earthPhys.Radius       = 6371;
            earthPhys.Velocity     = new double[] { 0, 0, 29.78 * 1000 };
            earthPhys.Acceleration = new double[3];

            /*
             * PhysicsObject moonPhys = new PhysicsObject();
             * moonPhys.Mass = 7.3477 * Math.Pow(10, 22);
             * moonPhys.Radius = 173700;
             * moonPhys.Velocity = new double[] { 0, 0, 1.022 * 1000};
             * moonPhys.Acceleration = new double[3];
             */

            PhysicsObject marsPhys = new PhysicsObject();

            marsPhys.Mass         = 6.4185 * Math.Pow(10, 23);
            marsPhys.Radius       = 3389.5;
            marsPhys.Velocity     = new double[] { 0, 0, 24.077 * 1000 };
            marsPhys.Acceleration = new double[3];

            PhysicsObject jupiterPhys = new PhysicsObject();

            jupiterPhys.Mass         = 1.8986 * Math.Pow(10, 27);
            jupiterPhys.Radius       = 69911;
            jupiterPhys.Velocity     = new double[] { 0, 0, 13.07 * 1000 };
            jupiterPhys.Acceleration = new double[3];

            PhysicsObject saturnPhys = new PhysicsObject();

            saturnPhys.Mass         = 5.6846 * Math.Pow(10, 26);
            saturnPhys.Radius       = 60268;
            saturnPhys.Velocity     = new double[] { 0, 0, 9.69 * 1000 };
            saturnPhys.Acceleration = new double[3];

            PhysicsObject uranusPhys = new PhysicsObject();

            uranusPhys.Mass         = 8.6810 * Math.Pow(10, 25);
            uranusPhys.Radius       = 25362;
            uranusPhys.Velocity     = new double[] { 0, 0, 6.8 * 1000 };
            uranusPhys.Acceleration = new double[3];

            PhysicsObject neptunePhys = new PhysicsObject();

            neptunePhys.Mass         = 1.0243 * Math.Pow(10, 26);
            neptunePhys.Radius       = 24622;
            neptunePhys.Velocity     = new double[] { 0, 0, 5.43 * 1000 };
            neptunePhys.Acceleration = new double[3];
            /* -------------- */

            /* NEW SIMOBJECT PREPARATION */
            GraphicsObject sunGraph     = new GraphicsObject(0, new double[] { sunPhys.Radius, sunPhys.Radius, sunPhys.Radius });
            GraphicsObject mercuryGraph = new GraphicsObject(0, new double[] { mercuryPhys.Radius, mercuryPhys.Radius, mercuryPhys.Radius });
            GraphicsObject venusGraph   = new GraphicsObject(0, new double[] { venusPhys.Radius, venusPhys.Radius, venusPhys.Radius });

            GraphicsObject earthGraph = new GraphicsObject(0, new double[] { earthPhys.Radius, earthPhys.Radius, earthPhys.Radius });
            //GraphicsObject moonGraph = new GraphicsObject(0, new double[] { moonPhys.Radius, moonPhys.Radius, moonPhys.Radius });

            GraphicsObject marsGraph    = new GraphicsObject(0, new double[] { marsPhys.Radius, marsPhys.Radius, marsPhys.Radius });
            GraphicsObject jupiterGraph = new GraphicsObject(0, new double[] { jupiterPhys.Radius, jupiterPhys.Radius, jupiterPhys.Radius });
            GraphicsObject saturnGraph  = new GraphicsObject(0, new double[] { saturnPhys.Radius, saturnPhys.Radius, saturnPhys.Radius });
            GraphicsObject uranusGraph  = new GraphicsObject(0, new double[] { uranusPhys.Radius, uranusPhys.Radius, uranusPhys.Radius });
            GraphicsObject neptuneGraph = new GraphicsObject(0, new double[] { neptunePhys.Radius, neptunePhys.Radius, neptunePhys.Radius });

            SimObject sunSim = new SimObject(new double[3], sunPhys, sunGraph);

            double mercuryDist = 57909050.0;

            double[]  mercuryIncl = new double[] { mercuryDist *Math.Cos(3.38 *Math.PI / 180), mercuryDist *Math.Sin(3.38 * Math.PI / 180) };
            SimObject mercurySim  = new SimObject(new double[] { mercuryIncl[0], mercuryIncl[1], 0 }, mercuryPhys, mercuryGraph);

            double    venusDist = 108208000.0;
            double[]  venusIncl = new double[] { venusDist *Math.Cos(3.86 *Math.PI / 180), venusDist *Math.Sin(3.86 * Math.PI / 180) };
            SimObject venusSim  = new SimObject(new double[] { venusIncl[0], venusIncl[1], 0 }, venusPhys, venusGraph);

            double    earthDist = 149598261.0;
            double[]  earthIncl = new double[] { earthDist *Math.Cos(7.155 *Math.PI / 180), earthDist *Math.Sin(7.155 * Math.PI / 180) };
            SimObject earthSim  = new SimObject(new double[] { earthIncl[0], earthIncl[1], 0 }, earthPhys, earthGraph);

            /*
             * double moonDist = earthDist + 384399;
             * double[] moonIncl = new double[] { moonDist * Math.Cos(5.145 * Math.PI / 180), moonDist * Math.Sin(5.145 * Math.PI / 180) };
             * SimObject moonSim = new SimObject(new double[] { moonIncl[0], moonIncl[1], 0 }, moonPhys, moonGraph);
             */

            double    marsDist = 227939100.0;
            double[]  marsIncl = new double[] { marsDist *Math.Cos(5.65 *Math.PI / 180), marsDist *Math.Sin(5.65 * Math.PI / 180) };
            SimObject marsSim  = new SimObject(new double[] { marsIncl[0], marsIncl[1], 0 }, marsPhys, marsGraph);

            double    jupiterDist = 778547200.0;
            double[]  jupiterIncl = new double[] { jupiterDist *Math.Cos(6.09 *Math.PI / 180), jupiterDist *Math.Sin(6.09 * Math.PI / 180) };
            SimObject jupiterSim  = new SimObject(new double[] { jupiterIncl[0], jupiterIncl[1], 0 }, jupiterPhys, jupiterGraph);

            double    saturnDist = 1433449370.0;
            double[]  saturnIncl = new double[] { saturnDist *Math.Cos(5.51 *Math.PI / 180), saturnDist *Math.Sin(5.51 * Math.PI / 180) };
            SimObject saturnSim  = new SimObject(new double[] { saturnIncl[0], saturnIncl[1], 0 }, saturnPhys, saturnGraph);

            double    uranusDist = 2870671400.0;
            double[]  uranusIncl = new double[] { uranusDist *Math.Cos(6.48 *Math.PI / 180), uranusDist *Math.Sin(6.48 * Math.PI / 180) };
            SimObject uranusSim  = new SimObject(new double[] { uranusIncl[0], uranusIncl[1], 0 }, uranusPhys, uranusGraph);

            double    neptuneDist = 4498542600.0;
            double[]  neptuneIncl = new double[] { neptuneDist *Math.Cos(6.43 *Math.PI / 180), neptuneDist *Math.Sin(6.43 * Math.PI / 180) };
            SimObject neptuneSim  = new SimObject(new double[] { neptuneIncl[0], neptuneIncl[1], 0 }, neptunePhys, neptuneGraph);
            /* ------------------------- */

            /* Setup SimObjList & GraphicsController */
            RenderWindow renderWindow = new RenderWindow(1024, 768, OpenTK.Graphics.GraphicsMode.Default, "Solar Simulation V2");
            renderWindow.AddDrawObj(sunSim);
            renderWindow.AddDrawObj(mercurySim);
            renderWindow.AddDrawObj(venusSim);
            renderWindow.AddDrawObj(earthSim);
            renderWindow.AddDrawObj(marsSim);
            renderWindow.AddDrawObj(jupiterSim);
            renderWindow.AddDrawObj(saturnSim);
            renderWindow.AddDrawObj(uranusSim);
            renderWindow.AddDrawObj(neptuneSim);

            //renderWindow.AddDrawObj(moonSim);

            renderWindow.InitScene();
            renderWindow.Run();
        }