コード例 #1
0
        /// <summary>
        /// Updates the view and projection matrices with current camera data.
        /// </summary>
        public void UpdateMatrices()
        {
            projectionMatrix     = GetProjectionMatrix();
            viewMatrix           = GetViewMatrix();
            ViewProjectionMatrix = viewMatrix * projectionMatrix;
            invRotationMatrix    = Matrix3.CreateRotationX(-RotationX) *
                                   Matrix3.CreateRotationY(-RotationY);

            CameraFrustum.UpdateCamera(this);
        }
コード例 #2
0
 /// <summary>
 /// Checks if a bounding node is within the camera fustrum.
 /// </summary>
 public bool InFustrum(BoundingNode boundingNode)
 {
     return(CameraFrustum.CheckIntersection(this, boundingNode));
 }