예제 #1
0
파일: Scene.cs 프로젝트: abordt/Viking
        public Scene(Viewport v, Camera cam)
        {
            this.cameraPropertyChangedEventHandler = new PropertyChangedEventHandler(OnCameraPropertyChanged);

            this._camera = cam;
            if (_camera != null)
                _camera.PropertyChanged += cameraPropertyChangedEventHandler;

            _Viewport = v;

            _World = Matrix.Identity;

            UpdateProjectionMatrix();
            _WorldViewProj = (_World * Camera.View) * _Projection;
        }
예제 #2
0
파일: Scene.cs 프로젝트: abordt/Viking
 protected void Dispose(bool freeManagedObjectsAlso)
 {
     if (freeManagedObjectsAlso)
     {
         if (_camera != null)
         {
             _camera.PropertyChanged -= this.cameraPropertyChangedEventHandler;
             _camera = null;
         }
     }
 }