Home > Working with SGWorld > Analysis (IAnalysis6) > CalculateVolume

CalculateVolume

Analyzes the amount of terrain removed or added by selected Modify Terrain objects.

 

JavaScript

 

CalculateVolume(

      arrObjectID,

      SampleInterval)

 

C#

 

IVolumeAnalysisInfo6 CalculateVolume(

      object arrObjectID,

      double SampleInterval)

 

C++

 

HRESULT CalculateVolume(

      VARIANT arrObjectID,

      double SampleInterval,

      IVolumeAnalysisInfo6 ** pVal) 

 

Parameters

arrObjectID

An array that contains the ID’s of the ITerrainModifier objects to be analyzed.

SampleInterval

The distance between terrain sample points. The smaller the sample interval, the more accurate the calculation, but the longer it takes to calculate.

Return Value

pVal

An IVolumeAnalysisInfo6 representing the volume of the terrain removed or added.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.