TerrainAlongLineComputeTerrainIntersection Method (Cartesian, Cartographic, UnitCartesian, Double, Double, TerrainProvider, Double, Double) |
Computes the location of the first intersection with terrain from the provided location along the indicated direction.
Both
Cartesian and
Cartographic representations of the location are provided
which eliminates the need for conversion within the algorithm and results in greater efficiency.
Namespace:
AGI.Foundation.Terrain
Assembly:
AGI.Foundation.TerrainAnalysis (in AGI.Foundation.TerrainAnalysis.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax public static Cartographic? ComputeTerrainIntersection(
Cartesian cartesian,
Cartographic cartographic,
UnitCartesian direction,
double granularity,
double maximumDistance,
TerrainProvider terrainProvider,
double minimumTerrainHeight,
double maximumTerrainHeight
)
Public Shared Function ComputeTerrainIntersection (
cartesian As Cartesian,
cartographic As Cartographic,
direction As UnitCartesian,
granularity As Double,
maximumDistance As Double,
terrainProvider As TerrainProvider,
minimumTerrainHeight As Double,
maximumTerrainHeight As Double
) As Cartographic?
public:
static Nullable<Cartographic> ComputeTerrainIntersection(
Cartesian cartesian,
Cartographic cartographic,
UnitCartesian direction,
double granularity,
double maximumDistance,
TerrainProvider^ terrainProvider,
double minimumTerrainHeight,
double maximumTerrainHeight
)
static member ComputeTerrainIntersection :
cartesian : Cartesian *
cartographic : Cartographic *
direction : UnitCartesian *
granularity : float *
maximumDistance : float *
terrainProvider : TerrainProvider *
minimumTerrainHeight : float *
maximumTerrainHeight : float -> Nullable<Cartographic>
Parameters
- cartesian
- Type: AGI.Foundation.CoordinatesCartesian
The Cartesian representation of the location expressed in the reference frame fixed to the
ellipsoid specified by the Shape property of the terrainProvider.
- cartographic
- Type: AGI.Foundation.CoordinatesCartographic
The planetodetic cartographic representation of the location expressed in the reference frame fixed to the
ellipsoid specified by the Shape property of the
terrainProvider.
- direction
- Type: AGI.Foundation.CoordinatesUnitCartesian
The direction along which to check for intersection with terrain. - granularity
- Type: SystemDouble
The sampling step as a positively valued fraction of the terrain resolution. - maximumDistance
- Type: SystemDouble
A positively valued limit on the distance in meters along
the indicated direction at which intersection with terrain is no longer checked. - terrainProvider
- Type: AGI.Foundation.TerrainTerrainProvider
The terrain provider describing the terrain that is potentially obscuring the path
between the two objects.
- minimumTerrainHeight
- Type: SystemDouble
The minimum height in meters that can be returned by the
TerrainProvider's GetHeightRelativeToShape(Double, Double) method.
Setting this value lower than necessary will not affect the results, but it will decrease
performance. Setting it too high can cause incorrect results. For realistic Earth-based terrain data,
DefaultMinimumTerrainHeight is a safe value to use for this parameter.
- maximumTerrainHeight
- Type: SystemDouble
The maximum height in meters that can be returned by the
TerrainProvider's GetHeightRelativeToShape(Double, Double) method.
Setting this value higher than necessary will not affect the results, but it will decrease
performance. Setting it too low can cause incorrect results. For realistic Earth-based terrain data,
DefaultMaximumTerrainHeight is a safe value to use for this parameter.
Return Value
Type:
NullableCartographic
The planetodetic location of intersection with terrain expressed in the reference frame fixed to the
ellipsoid specified by the
Shape property of the
terrainProvider or null if no intersection exists. The provided location may be returned
as the point of intersection if it lies on the terrain surface and the indicated direction is directly
into the terrain surface.
Exceptions See Also