Exemple #1
0
 /// <summary>
 /// Initializes a new instance of <see cref="SurfaceRegion"/>.
 /// </summary>
 /// <param name="planet">The planet on which this region is found.</param>
 /// <param name="latitude">The latitude of the center of the region.</param>
 /// <param name="longitude">The longitude of the center of the region.</param>
 /// <param name="latitudeRange">
 /// <para>
 /// The range of latitudes encompassed by this region, as an angle (in radians).
 /// </para>
 /// <para>
 /// Maximum value is π (a full hemisphere, which produces the full globe).
 /// </para>
 /// </param>
 public SurfaceRegion(Planetoid planet, double latitude, double longitude, HugeNumber latitudeRange)
     : base(planet.Id, new Frustum <HugeNumber>(2, planet.LatitudeAndLongitudeToVector(latitude, longitude) * (planet.Shape.ContainingRadius + planet.Atmosphere.AtmosphericHeight), HugeNumber.Min(latitudeRange, HugeNumber.Pi), 0))
 {
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of <see cref="SurfaceRegion"/>.
 /// </summary>
 /// <param name="planet">The planet on which this region is found.</param>
 /// <param name="position">The normalized position vector of this region.</param>
 /// <param name="latitudeRange">
 /// <para>
 /// The range of latitudes encompassed by this region, as an angle (in radians).
 /// </para>
 /// <para>
 /// Maximum value is π (a full hemisphere, which produces the full globe).
 /// </para>
 /// </param>
 public SurfaceRegion(Planetoid planet, Vector3 <HugeNumber> position, HugeNumber latitudeRange)
     : base(planet.Id, new Frustum <HugeNumber>(2, position * (planet.Shape.ContainingRadius + planet.Atmosphere.AtmosphericHeight), HugeNumber.Min(latitudeRange, HugeNumber.Pi), 0))
 {
 }