This document is archived and information here might be outdated. Recommended version. |
The enclosed 3D volume.
[Visual Basic .NET]
Public ReadOnly Property Volume As Double
[C#]
public double Volume {get;}
[C++]
HRESULT get_Volume(
System.Double* volumeValue
);
[C++] Parameters volumeValue [out, retval]
volumeValue is a parameter of type double*
Returns the volume of 3D space occupied by a MultiPatch. Handles closed and some non-closed MultiPatches.
If Patches comprising a MultiPatch geometry have improperly ordered vertices such that positive faces are not pointing outwards, a negative volume will be returned. To ensure proper orientation, add vertices in a clockwise manner relative to an outside observer.
public static void CalculateVolume()
{
IGeometry geometry = GetMultiPatchGeometry();
IVolume volume = geometry as IVolume;
double calculatedVolume = volume.Volume;
//calculatedVolume = 225.048
}