Exemplo n.º 1
0
        public override void StartSimulation(IRTIambassador rtiAmb)
        {
            if (log.IsInfoEnabled)
            {
                log.Info("Start Boids simulation");
            }

            JoinSimulation(rtiAmb, color, "Boids");

            try
            {
                simulationThread = new Thread(new ThreadStart(SimulationLoop));
                boidsManager     = new BoidsManager(federateAmbassador);
                boidsManager.BuildBoids(NUMBER_BOIDS, new Vector3(750, 60, 750), color);
                BoidsSample app = new BoidsSample(boidsManager, color);
                simulationThread.Start();
                app.Go();
            }
            catch (Exception e)
            {
                if (log.IsErrorEnabled)
                {
                    log.Error("Failed running simulation. Exception :" + e.Message);
                }
            }
        }
Exemplo n.º 2
0
 static void Main(string[] args)
 {
     try
     {
         BoidsSample app = new BoidsSample(null, "");
         app.Go();
     }
     catch
     {
         // Check if it's an Ogre Exception
         if (Mogre.OgreException.IsThrown)
             Example.ShowOgreException();
         else
             throw;
     }
 }
Exemplo n.º 3
0
 static void Main(string[] args)
 {
     try
     {
         BoidsSample app = new BoidsSample(null, "");
         app.Go();
     }
     catch
     {
         // Check if it's an Ogre Exception
         if (Mogre.OgreException.IsThrown)
         {
             Example.ShowOgreException();
         }
         else
         {
             throw;
         }
     }
 }
Exemplo n.º 4
0
        public override void StartSimulation(IRTIambassador rtiAmb)
        {
            if (log.IsInfoEnabled)
                log.Info("Start Boids simulation");

            JoinSimulation(rtiAmb, color, "Boids");

            try
            {
                simulationThread = new Thread(new ThreadStart(SimulationLoop));
                boidsManager = new BoidsManager(federateAmbassador);
                boidsManager.BuildBoids(NUMBER_BOIDS, new Vector3(750, 60, 750), color);
                BoidsSample app = new BoidsSample(boidsManager, color);
                simulationThread.Start();
                app.Go();
            }
            catch (Exception e)
            {
                if (log.IsErrorEnabled)
                    log.Error("Failed running simulation. Exception :" + e.Message);
            }
        }