Exemplo n.º 1
0
 /// <summary>
 /// Defines a camera - with the mode and the track method.
 /// </summary>
 /// <param name="mode">Camera mode.</param>
 /// <param name="tmode">Camera track mode.</param>
 /// <param name="target">Target ship.</param>
 /// <param name="refbody">Reference body (for Target[from|to] and Ground track modes).</param>
 public OrbCamera(CameraMode mode, CameraTrackMode tmode, string target = "", string refbody = "")
 {
     Mode = mode;
     Target = target;
     RefBody = refbody;
     Pos = new Vector3(0, 5, 2);
     TrackMode = tmode;
     GroundLocation = new double[] { 0, 0, 0 };
     GroundDirection = new double[] { 0, 0 };
     FieldOfView = 60.0;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Defines a camera - with the mode and the track method.
 /// </summary>
 /// <param name="mode">Camera mode.</param>
 /// <param name="tmode">Camera track mode.</param>
 /// <param name="target">Target ship.</param>
 /// <param name="refbody">Reference body (for Target[from|to] and Ground track modes).</param>
 public OrbCamera(CameraMode mode, CameraTrackMode tmode, string target = "", string refbody = "")
 {
     Mode            = mode;
     Target          = target;
     RefBody         = refbody;
     Pos             = new Vector3(0, 5, 2);
     TrackMode       = tmode;
     GroundLocation  = new double[] { 0, 0, 0 };
     GroundDirection = new double[] { 0, 0 };
     FieldOfView     = 60.0;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Changes camera to a ground camera with defined position.
 /// </summary>
 /// <param name="longitude">Longitude of the camera on the reference body.</param>
 /// <param name="latitude">Latitude of the camera on the reference body.</param>
 /// <param name="altitude">Altitude of the camera on the reference body.</param>
 /// <param name="refbody">Reference body. Leave blank for no change.</param>
 public void ChangeCamPosition(double longitude, double latitude, double altitude, string refbody = "")
 {
     TrackMode = CameraTrackMode.Ground;
     GroundLocation = new double[] { longitude, latitude, altitude };
     if ( string.IsNullOrWhiteSpace(refbody)) RefBody = refbody;
 }