ArcObjects Library Reference (Geometry)  

IArea3D.QueryCentroid3D Method

Copies the centroid of this 3D surface area to the specified point.

[Visual Basic .NET]
Public Sub QueryCentroid3D ( _
    ByVal Center As IPoint _
)
[C#]
public void QueryCentroid3D (
    IPoint Center
);
[C++]
HRESULT QueryCentroid3D(
  IPoint* Center
);
[C++]

Parameters

Center

  Center is a parameter of type IPoint

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.
[C#]

        public static void QueryCentroid3D()

        {

               IGeometry multiPatchGeometry = GetMultiPatchGeometry();

               IArea3D area3D = multiPatchGeometry as IArea3D;

               IPoint centroid3D = new PointClass();

              
area3D.QueryCentroid3D(centroid3D);


               //centroid3D = (0, 0, 8.5)
        }

See Also

IArea3D Interface