This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IP > IProximityOperator3D Interface > IProximityOperator3D.ReturnDistance3D Method (ArcObjects .NET 10.4 SDK) |
Returns the minimal distance between two geometries.
[Visual Basic .NET] Public Function ReturnDistance3D ( _ ByVal pOther As IGeometry _ ) As Double
[C#] public double ReturnDistance3D ( IGeometry pOther );
[C++]
HRESULT ReturnDistance3D(
IGeometry* pOther,
double* pDistance
);
[C++]
Parameters pOther
pOther is a parameter of type IGeometry pDistance [out, retval] pDistance is a parameter of type double
Returns the minimum distance between two z aware geometries in 3D space. If the geometries intersect, the minimum distance is 0. Only returns the distance, and not the nearest points.
public static void ReturnDistance3D()
{
IGeometry pointGeometry=GetPointGeometry();
IGeometry envelopeGeometry=GetEnvelopeGeometry();
IProximityOperator3D proximityOperator3D=envelopeGeometry as IProximityOperator3D;
double distance3D=proximityOperator3D.ReturnDistance3D(pointGeometry);
//distance3D = 13.971
}