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); } } }
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; } }
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; } } }
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); } }