This document is archived and information here might be outdated. Recommended version. |
A continuous 3D strip of triangles, where each triangle after the first shares an edge with the preceding triangle.
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 | 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. |
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 (esriSystem) | |
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. |
ITriangleStrip | Indicator interface that identifies a triangle strip. |
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. |
private static object _missing = Type.Missing;
public static IGeometry GetTriangleStripGeometry()
{
//TriangleStrip: Stairs
IPointCollection triangleStripPointCollection = new TriangleStripClass();
//First Step
triangleStripPointCollection.AddPoint(
ConstructPoint3D(0, 10, 10),
ref _missing, ref _missing
);
triangleStripPointCollection.AddPoint(
ConstructPoint3D(10, 10, 10),
ref _missing, ref _missing
);
triangleStripPointCollection.AddPoint(
ConstructPoint3D(0, 7.5, 10),
ref _missing, ref _missing
);
triangleStripPointCollection.AddPoint(
ConstructPoint3D(10, 7.5, 10),
ref _missing, ref _missing
);
//Second Step
triangleStripPointCollection.AddPoint(
ConstructPoint3D(0, 7.5, 7.5),
ref _missing, ref _missing
);
triangleStripPointCollection.AddPoint(
ConstructPoint3D(10, 7.5, 7.5),
ref _missing, ref _missing
);
triangleStripPointCollection.AddPoint(
ConstructPoint3D(0, 5, 7.5),
ref _missing, ref _missing
);
triangleStripPointCollection.AddPoint(
ConstructPoint3D(10, 5, 7.5),
ref _missing, ref _missing
);
//Third Step
triangleStripPointCollection.AddPoint(
ConstructPoint3D(0, 5, 5),
ref _missing, ref _missing
);
triangleStripPointCollection.AddPoint(
ConstructPoint3D(10, 5, 5),
ref _missing, ref _missing
);
triangleStripPointCollection.AddPoint(
ConstructPoint3D(0, 2.5, 5),
ref _missing, ref _missing
);
triangleStripPointCollection.AddPoint(
ConstructPoint3D(10, 2.5, 5),
ref _missing, ref _missing
);
//Fourth Step
triangleStripPointCollection.AddPoint(
ConstructPoint3D(0, 2.5, 2.5),
ref _missing, ref _missing
);
triangleStripPointCollection.AddPoint(
ConstructPoint3D(10, 2.5, 2.5),
ref _missing, ref _missing
);
triangleStripPointCollection.AddPoint(
ConstructPoint3D(0, 0, 2.5),
ref _missing, ref _missing
);
triangleStripPointCollection.AddPoint(
ConstructPoint3D(10, 0, 2.5),
ref _missing, ref _missing
);
//End
triangleStripPointCollection.AddPoint(
ConstructPoint3D(0, 0, 0),
ref _missing, ref _missing
);
triangleStripPointCollection.AddPoint(
ConstructPoint3D(10, 0, 0),
ref _missing, ref _missing
);
return triangleStripPointCollection 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;
}