/// <summary>
 /// Initializes a new instance of the <see cref="FirstPerson"/> class.
 /// </summary>
 /// <param name="position">The position of the camera.</param>
 /// <param name="heading">The heading.</param>
 /// <param name="tilt">The tilt.</param>
 public FirstPerson(Vector3 position, float heading = 0f, float tilt = 0f)
 {
     cachedMatrixView = new DirtyFlag <Matrix4x4>(CalcViewMatrix);
     PropertyChanged += (s, a) => cachedMatrixView.Invalidate();
     Position         = position;
     Heading          = heading;
     Tilt             = tilt;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="Perspective"/> class.
 /// </summary>
 /// <param name="fieldOfViewY">The field-of-view in y-direction.</param>
 /// <param name="aspect">The aspect ratio.</param>
 /// <param name="nearClip">The near clip plane distance.</param>
 /// <param name="farClip">The far clip plane distance.</param>
 public Perspective(float fieldOfViewY = 90f, float nearClip = 0.1f, float farClip = 1f, float aspect = 1f)
 {
     cachedMatrix     = new DirtyFlag <Matrix4x4>(CalculateProjectionMatrix);
     PropertyChanged += (s, a) => cachedMatrix.Invalidate();
     Aspect           = aspect;
     FarClip          = farClip;
     FieldOfViewY     = fieldOfViewY;
     NearClip         = nearClip;
 }
Exemple #3
0
		/// <summary>
		/// Initializes a new instance of the <see cref="Orbit"/> class.
		/// </summary>
		/// <param name="distance">The distance to the target.</param>
		/// <param name="azimuth">The azimuth or heading.</param>
		/// <param name="elevation">The elevation or tilt.</param>
		public Orbit(float distance = 1f, float azimuth = 0f, float elevation = 0f)
		{
			cachedMatrixView = new DirtyFlag<Matrix4x4>(CalcViewMatrix);
			PropertyChanged += (s, a) => cachedMatrixView.Invalidate();
			Azimuth = azimuth;
			Distance = distance;
			Elevation = elevation;

		}