예제 #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);
 }