Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Orbit"/> class.
 /// </summary>
 /// <param name="location"></param>
 /// <param name="azimuth">The azimuth or heading.</param>
 /// <param name="elevation">The elevation or tilt.</param>
 public Position(Vector3 location, float azimuth = 0f, float elevation = 0f)
 {
     _cachedMatrixView = new CachedCalculatedValue <Matrix4x4>(CalcViewMatrix);
     PropertyChanged  += (s, a) => _cachedMatrixView.Invalidate();
     Azimuth           = azimuth;
     Elevation         = elevation;
     _location         = location;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Perspective"/> class.
 /// </summary>
 /// <param name="height"></param>
 /// <param name="nearClip">The near clip plane distance.</param>
 /// <param name="farClip">The far clip plane distance.</param>
 /// <param name="width"></param>
 public Ortographic(float width, float height, float nearClip = 0.1f, float farClip = 100)
 {
     _cachedMatrix    = new CachedCalculatedValue <Matrix4x4>(CalculateProjectionMatrix);
     PropertyChanged += (s, a) => _cachedMatrix.Invalidate();
     _width           = width;
     _height          = height;
     _nearClip        = nearClip;
     _farClip         = farClip;
 }