Beispiel #1
0
        protected override void CreateDefaultCamera()
        {
            var camComponent = new ArcBallCameraComponent(Vector3.Zero, 10.0f, 45.0f, -45.0f, 0.0f, RenderConfig.ScreenSize, 0.1f, 500.0f);

            CurrentCamera = new CameraActor(camComponent);

            SceneGraph.AddActor(CurrentCamera);
        }
Beispiel #2
0
        public void AddStaticMesh(StaticMesh mesh)
        {
            if (mesh == null)
            {
                return;
            }

            StaticMeshActor focusActor = new StaticMeshActor();

            ((StaticMeshActor)focusActor).StaticMeshComponent.AddStaticMesh(mesh);

            SceneGraph.AddActor(focusActor);
        }
Beispiel #3
0
        protected override void Init3D()
        {
            base.Init3D();

            StaticMeshActor actor = new StaticMeshActor();

            actor.StaticMeshComponent.AddStaticMesh(new MyStaticMesh(Game1.MainGame.SceneManager));
            SceneGraph.AddActor(actor);

            actor = new StaticMeshActor();
            actor.StaticMeshComponent.AddStaticMesh(new StaticMeshCube(Game1.MainGame.SceneManager));
            SceneGraph.AddActor(actor);
        }