<commit_before>﻿using System;
using Mogre;
using Mogre.TutorialFramework; // provides a simple 'BaseApplication' class


namespace OgreRobo
{
    class OgreRobo : BaseApplication 
    {
        Rect mapDomain = new Rect (-2000, 2000, 2000, -2000);

        AgentEnvironment agentEnvironment;

        public static void Main()
        {
            new OgreRobo().Go();

            
        }

        protected override void CreateScene()
        {
            mRoot.FrameRenderingQueued += new FrameListener.FrameRenderingQueuedHandler(FrameRenderingQueued);


            // scene configuration //////////
    
            // setting lighting

            mSceneMgr.AmbientLight = ColourValue.White;
            mSceneMgr.ShadowTechnique = ShadowTechnique.SHADOWTYPE_STENCIL_ADDITIVE;

            // setting sky box
            mSceneMgr.SetSkyDome(true, "Examples/SpaceSkyPlane", 5, 2); // CloudySky
            

            // ground

            mSceneMgr.SetWorldGeometry("terrain.cfg");
            int terrainSize = 25000;
            mSceneMgr.GetSceneNode("Terrain").SetPosition(-terrainSize / 2, -5, -terrainSize/2);
    

            
            Plane plane = new Plane(Vector3.UNIT_Y, 0);
            MeshManager.Singleton.CreatePlane("ground",
                ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, plane,
                10000, 10000, 20, 20, true, 1, 5, 5, Vector3.UNIT_Z);
            Entity groundEnt = mSceneMgr.CreateEntity("GroundEntity", "ground");
            mSceneMgr.RootSceneNode.CreateChildSceneNode().AttachObject(groundEnt);
            groundEnt.SetMaterialName("Custom/Dirt");
            groundEnt.CastShadows = false;
            
 
            // fog
            //ColourValue fadeColour = new ColourValue(0.09f, 0.09f, 0.09f);
            //fadeColour = new ColourValue(0.9f, 0.9f, 0.9f);
            //mWindow.GetViewport(0).BackgroundColour = fadeColour;
            
            //mSceneMgr.SetFog(FogMode.FOG_EXP2, fadeColour, 0.00025f);

            //fog test
            
            //fadeColour = new ColourValue(0.1f, 0.1f, 0.1f);
            //mWindow.GetViewport(0).BackgroundColour = fadeColour;
            //mSceneMgr.SetFog(FogMode.FOG_LINEAR, fadeColour, 0, 10, 150);
            //mSceneMgr.SetFog(FogMode.FOG_EXP2, fadeColour, 0.00025f);
        
            

            //Plane plane;
            //plane.d = 10000;
            //plane.normal = Vector3.NEGATIVE_UNIT_Y;

            // light

            Light pointLight = mSceneMgr.CreateLight("pointLight");
            pointLight.Type = Light.LightTypes.LT_POINT;
            pointLight.Position = new Vector3(0, 2000, 0);


            // fire

            ParticleSystem fireParticle = mSceneMgr.CreateParticleSystem("Fire", "CustomSmoke");//"TRPlayer/Torch");
            SceneNode particleNode = mSceneMgr.RootSceneNode.CreateChildSceneNode("Particle");
            particleNode.SetPosition(1000, 100, 1000);
            particleNode.AttachObject(fireParticle);
            Light pointLight2 = mSceneMgr.CreateLight();
            pointLight2.Type = Light.LightTypes.LT_POINT;
            pointLight2.Position = new Vector3(1000, 100, 1000);
            pointLight2.DiffuseColour = ColourValue.Red;
            //pointLight2.SpecularColour = ColourValue.Red;
            Entity e = mSceneMgr.CreateEntity("Cylinder.mesh");
            e.SetMaterialName("WoodPallet");
            SceneNode n = mSceneMgr.RootSceneNode.CreateChildSceneNode();
            
            n.AttachObject(e);
            n.SetPosition(1000, 50, 1000);
            n.Scale(100, 10, 10);
            n.Rotate(new Vector3(0, 0, 1), Mogre.Math.PI / 2);
            
            

             
             
            // Agents //////////////////
            agentEnvironment = new AgentEnvironment(mapDomain, mSceneMgr);
            agentEnvironment.newRound();
        }



        bool FrameRenderingQueued(FrameEvent evt)
        {
            agentEnvironment.Update(evt.timeSinceLastFrame);
            return true;
        }<commit_msg>Added a torch<commit_after>﻿using System;
using Mogre;
using Mogre.TutorialFramework; // provides a simple 'BaseApplication' class


namespace OgreRobo
{
    class OgreRobo : BaseApplication 
    {
        Rect mapDomain = new Rect (-2000, 2000, 2000, -2000);

        AgentEnvironment agentEnvironment;

        public static void Main()
        {
            new OgreRobo().Go();

            
        }

        protected override void CreateScene()
        {
            mRoot.FrameRenderingQueued += new FrameListener.FrameRenderingQueuedHandler(FrameRenderingQueued);


            // scene configuration //////////
    
            // setting lighting

            mSceneMgr.AmbientLight = ColourValue.White;
            mSceneMgr.ShadowTechnique = ShadowTechnique.SHADOWTYPE_STENCIL_ADDITIVE;

            // setting sky box
            mSceneMgr.SetSkyDome(true, "Examples/SpaceSkyPlane", 5, 2); // CloudySky
            

            // ground

            mSceneMgr.SetWorldGeometry("terrain.cfg");
            int terrainSize = 25000;
            mSceneMgr.GetSceneNode("Terrain").SetPosition(-terrainSize / 2, -5, -terrainSize/2);
    

            
            Plane plane = new Plane(Vector3.UNIT_Y, 0);
            MeshManager.Singleton.CreatePlane("ground",
                ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, plane,
                10000, 10000, 20, 20, true, 1, 5, 5, Vector3.UNIT_Z);
            Entity groundEnt = mSceneMgr.CreateEntity("GroundEntity", "ground");
            mSceneMgr.RootSceneNode.CreateChildSceneNode().AttachObject(groundEnt);
            groundEnt.SetMaterialName("Custom/Dirt");
            groundEnt.CastShadows = false;
            
 
            // fog
            //ColourValue fadeColour = new ColourValue(0.09f, 0.09f, 0.09f);
            //fadeColour = new ColourValue(0.9f, 0.9f, 0.9f);
            //mWindow.GetViewport(0).BackgroundColour = fadeColour;
            
            //mSceneMgr.SetFog(FogMode.FOG_EXP2, fadeColour, 0.00025f);



            // light

            /*
            Light pointLight = mSceneMgr.CreateLight("pointLight");
            pointLight.Type = Light.LightTypes.LT_POINT;
            pointLight.Position = new Vector3(0, 2000, 0);
            */

            // fire

            float x = 0, y = 0;
            ParticleSystem fireParticle = mSceneMgr.CreateParticleSystem("Fire", "CustomSmoke");//"TRPlayer/Torch");
            SceneNode particleNode = mSceneMgr.RootSceneNode.CreateChildSceneNode("Particle");
            particleNode.SetPosition(x, 100, y);
            particleNode.AttachObject(fireParticle);
            Light pointLight2 = mSceneMgr.CreateLight("test");
            pointLight2.Type = Light.LightTypes.LT_POINT;
            pointLight2.Position = new Vector3(x, 500, y);
            //pointLight2.DiffuseColour = ColourValue.White;
            //pointLight2.SetAttenuation(5000,1, 1, 1);
            //pointLight2.SetAttenuation(200000, 1, 0, 0);

            Entity e = mSceneMgr.CreateEntity("Cylinder.mesh");
            e.SetMaterialName("WoodPallet");
            SceneNode n = mSceneMgr.RootSceneNode.CreateChildSceneNode();           
            n.AttachObject(e);
            n.SetPosition(x, 45, y);
            n.Scale(90, 10, 10);
            n.Rotate(new Vector3(0, 0, 1), Mogre.Math.PI / 2);


            Light directionalLight = mSceneMgr.CreateLight("directionalLight");
            directionalLight.Type = Light.LightTypes.LT_DIRECTIONAL;
            directionalLight.DiffuseColour = new ColourValue(.25f, .25f, 0);
            directionalLight.SpecularColour = new ColourValue(.25f, .25f, 0);
            directionalLight.Direction = new Vector3(0, -1, 1);
            directionalLight.Position = new Vector3(0, 200, 0);
           directionalLight.PowerScale = 1000f ;

             
             
            // Agents //////////////////
            agentEnvironment = new AgentEnvironment(mapDomain, mSceneMgr);
            agentEnvironment.newRound();
        }



        bool FrameRenderingQueued(FrameEvent evt)
        {
            agentEnvironment.Update(evt.timeSinceLastFrame);
            return true;
        }
{'fraction_non_alphanumeric': 0.10736457699330493, 'fraction_numerical': 0.03603164942178941, 'mean_word_length': 1.879775674728356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1507010', 'n_tokens_mistral': 2587, 'n_tokens_neox': 2323, 'n_words': 412}