示例#1
0
        protected override void Init()
        {
            CameraComponent = Components.First(c => c.Id == CameraComponentId) as CameraComponent;
            CameraComponent.ClearColor = new Vector4(0.2f, 0.2f, 0.2f, 1.0f);

            Position = new Vector3(0, 0, 10);
        }
示例#2
0
文件: Scene.cs 项目: pdeparcq/iGL
        public void SetCurrentCamera(CameraComponent cameraComponent)
        {
            if (!_gameObjects.Any(g => g.Components.Contains(cameraComponent)))
            {
                throw new Exception("Camera is not part of this scene");
            }

            CurrentCamera = cameraComponent;
        }
示例#3
0
文件: Camera.cs 项目: pdeparcq/iGL
 public Camera(float fieldOfViewRadians, float aspectRatio, float zNear, float zFar)
 {
     CameraComponent = new CameraComponent(this, fieldOfViewRadians, aspectRatio, zNear, zFar);
     AddComponent(CameraComponent);
 }