Esempio n. 1
0
        public CC3GraphicsContext(GraphicsDeviceManager xnaGraphicsDeviceManager)
        {
            _xnaGraphicsDeviceManager = xnaGraphicsDeviceManager;

            _xnaClearColor = CC3GraphicsContext._defaultXnaClearColor;
            _clearDepth = CC3GraphicsContext._defaultClearDepth;
            _clearStencil = CC3GraphicsContext._defaultClearStencil;

            _viewMatrix = CC3Matrix.CC3MatrixIdentity;
            _projectionMatrix = CC3Matrix.CC3MatrixIdentity;
        }
Esempio n. 2
0
 protected virtual void UpdateWorldMatrix()
 {
     _worldMatrix = CC3Matrix.CreateTranslationMatrix(this.WorldPosition + this.WorldTranslationChangeNeededToUpdate);
 }
Esempio n. 3
0
 public CC3Node(CC3Vector worldPosition)
     : this()
 {
     _worldMatrix = CC3Matrix.CreateTranslationMatrix(worldPosition);
 }
Esempio n. 4
0
 public CC3Node()
 {
     _worldTranslationChangeNeededToUpdate = CC3Vector.CC3VectorZero;
     _worldMatrix = CC3Matrix.CC3MatrixIdentity;
 }
Esempio n. 5
0
        private void UpdateViewMatrix()
        {
            _viewMatrix
                = CC3Matrix.CreateCameraViewMatrix(this.WorldPosition + this.WorldTranslationChangeNeededToUpdate,
                                                   _cameraTarget,
                                                   _cameraRotationChangeRelativeToTargetNeededToUpdate,
                                                   _cameraUpDirection);
            _worldMatrix = _viewMatrix.Inverse();

            this.FinishedUpdatingViewMatrix();
        }