Пример #1
0
        public PulsarCamera(string name, PulsarScene scene, DebugRenderer debugRenderer)
        {
            //Debug.Print("PulsarCamera_Constructor - Creating camera - " + name);
            _name  = name;
            _scene = scene;

            if (_scene != null)
            {
                _node = _scene.CreateChild(_name);
                //Debug.Print("PulsarCamera_Constructor - Created Node - " + name);
                if (_node != null)
                {
                    _baseEntity = _node.CreateComponent <BaseEntity>();
                    //Debug.Print("PulsarCamera_Constructor - Created _baseEntity");
                    _baseEntity.Name = name;
                    //Debug.Print("PulsarCamera_Constructor - Set baseEntity name to " + name);
                    _baseEntity.Node = _node;
                    //Debug.Print("PulsarCamera_Constructor - Set baseEntity Node");
                    _baseEntity.PulsarScene = scene;
                    //Debug.Print("PulsarCamera_Constructor - Calling CreateEntity...");
                    CreateEntity();
                    //Debug.Print("PulsarCamera_Constructor - Setting debugRenderer");
                    _baseEntity.SetDebugRenderer(debugRenderer);
                    base.BaseEntity = _baseEntity;
                    _camera.DrawDebugGeometry(debugRenderer, false);
                    //CreateEntity();
                }
            }
        }
Пример #2
0
        public PulsarCamera(string name, PulsarScene scene)
        {
            _name  = name;
            _scene = scene;

            if (_scene != null)
            {
                _node = _scene.CreateChild(_name);
                if (_node != null)
                {
                    _baseEntity             = _node.CreateComponent <BaseEntity>();
                    _baseEntity.Name        = name;
                    _baseEntity.Node        = _node;
                    _baseEntity.PulsarScene = scene;
                    base.BaseEntity         = _baseEntity;
                    CreateEntity();
                }
            }
        }
Пример #3
0
        public PulsarLight(string name, PulsarScene scene, DebugRenderer debugRenderer)
        {
            _name  = name;
            _scene = scene;

            if (_scene != null)
            {
                _node = _scene.CreateChild(_name);
                if (_node != null)
                {
                    _baseEntity             = _node.CreateComponent <BaseEntity>();
                    _baseEntity.Name        = name;
                    _baseEntity.Node        = _node;
                    _baseEntity.PulsarScene = scene;
                    base.BaseEntity         = _baseEntity;
                    CreateEntity();
                    _baseEntity.SetDebugRenderer(debugRenderer);
                    _light.DrawDebugGeometry(debugRenderer, false);
                }
            }
        }
Пример #4
0
        protected override void Start()
        {
            base.Start();

            Engine.PostRenderUpdate += Engine_PostRenderUpdate;

            DisplayScene = new PulsarScene("MainScene", this)
            {
                InDesign = _inDesign
            };

            //create a default plane to work on
            DisplayScene.CreateWirePlane();

            SetViewport();

            UI.Cursor = new Urho.Gui.Cursor(Context)
            {
                Visible = true
            };
        }
Пример #5
0
 public void SetScene(PulsarScene scene)
 {
     _scene = scene;
 }
Пример #6
0
 public void DrawDebugGeometry(PulsarScene scene)
 {
     scene.SceneDebugRenderer.AddBoundingBox(GetBoundingBox(), Color.Red);
 }