ArcObjects Library Reference (Geometry)  

TriangleFan CoClass

A continuous 3D fan of triangles, where each triangle after the first shares an edge with the preceding triangle, and all triangles share a common pivot point.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Extended Error Information

Use the ISupportErrorInfo method InterfaceSupportsErrorInfo to determine if the object supports extended error information. If the object supports extended error info, VC++ developers should use the OLE/COM IErrorInfo interface to access the ErrorInfo object. Visual Basic developers should use the global error object Err to retrieve this extended error information.

Interfaces

Interfaces Description
IClone (esriSystem) Provides access to members that control cloning of objects.
IGeometry Provides access to members that describe properties and behavior of all geometric objects.
IGeometry2 Provides access to members that extend the IGeometry interface with a more sophisticated projection method.
IGeometryCollection Provides access to members that can be used for accessing, adding and removing individual geometries of a multi-part geometry (Multipoint, Polyline, Polygon, MultiPatch, and GeometryBag).
IMAware Indicator interface that identifies geometric objects that can have persistent M values attached to their vertices.
IPointCollection Provides access to members that manipulate the points of a Multipoint, Path, Ring, Polyline, Polygon, TriangleFan, TriangleStrip, or MultiPatch.
IPointCollection3 Provides access to members that manipulate the points of a Multipoint.
IPointCollection4 Provides access to members that manipulate the points of a Multipoint, Path, Ring, Polyline, Polygon, TriangleFan, TriangleStrip, or MultiPatch.
IPointIDAware Indicator interface that identifies geometries that can have persistent point ID values attached to coordinates.
ISupportErrorInfo Indicates whether a specific interface can return Automation error objects.
ITransform2D Provides access to methods for transforming geometries using either specific parameters or arbitrary transformation objects (affine transformations, geographic transformations, etc.).
ITransform3D Provides access to methods for transforming 3D geometries using either specific parameters or arbitrary transformation objects.
ITriangleFan Indicator interface that identifies a triangle fan.
IXMLSerialize (esriSystem) Provides access to members that XML serialize and deserialize an object to/from XML.
IZAware Indicator interface that identifies geometries that can have persistent Z values attached to their vertices.
[C#]

        private static object _missing = Type.Missing;

 

        public static IGeometry GetTriangleFanGeometry()

        {

            //TriangleFan: Partial Fan, Two Levels Of Zs

 

            IPointCollection triangleFanPointCollection = new TriangleFanClass();

 

            triangleFanPointCollection.AddPoint(
                   ConstructPoint3D(0, 0, 3), 
                  
ref _missing, ref _missing
            );

            triangleFanPointCollection.AddPoint(
                   ConstructPoint3D(0, -6, 3), 
                  
ref _missing, ref _missing
            );

            triangleFanPointCollection.AddPoint(
                   ConstructPoint3D(-3 *
Math.Sqrt(2), -3 * Math.Sqrt(2), 3), 
                  
ref _missing, ref _missing

            );

            triangleFanPointCollection.AddPoint(
                   ConstructPoint3D(-6, 0, 3), 
                  
ref _missing, ref _missing

            );

            triangleFanPointCollection.AddPoint(
                   ConstructPoint3D(-3 *
Math.Sqrt(2), 3 * Math.Sqrt(2), 0), 
                  
ref _missing, ref _missing

            );

            triangleFanPointCollection.AddPoint(
                   ConstructPoint3D(0, 6, 0), 
                  
ref _missing, ref _missing

            );

            triangleFanPointCollection.AddPoint(
                   ConstructPoint3D(3 *
Math.Sqrt(2), 3 * Math.Sqrt(2), 0), 
                  
ref _missing, ref _missing

            );

            triangleFanPointCollection.AddPoint(
                   ConstructPoint3D(6, 0, 0), 
                  
ref _missing, ref _missing

            );

           

            return triangleFanPointCollection as IGeometry;

        }

        private static IPoint ConstructPoint3D(double x, double y, double z)

        {

            IPoint point = ConstructPoint2D(x, y);

            point.Z = z;

           
return point;

        }

        private static IPoint ConstructPoint2D(double x, double y)

        {

            IPoint point = new PointClass();

            point.PutCoords(x, y);
 

            return point;

        }