예제 #1
0
        /// <summary>
        /// Updates the state of visualization with the given camera's parameter
        /// </summary>
        /// <param name="aCamera"></param>
        public void UpdateWithCameraParameters(Camera aCamera)
        {
            mCameraPosition.Xform.Translation = aCamera.CameraPosition;
            mLookAt.Xform.Translation         = aCamera.LookAt;

            // Note how we position the upVector Position: a displacement from CameraPosition!!
            mUpVectorPosition.Xform.Translation = aCamera.CameraPosition + (2f * aCamera.UpVector);

            mViewVector.SetEndPoints(aCamera.CameraPosition, aCamera.LookAt);
            mUpVector.SetEndPoints(aCamera.CameraPosition, mUpVectorPosition.Xform.Translation);
        }