Representation of a 3D Polygon.

    typedef struct {
        API_3D_Head        head;
        Int32              status;
        API_AttributeIndex iumat;
        Int32              irtxt;
        Int32              ivect;
        Int32              fpedg;
        Int32              lpedg;
    } API_PgonType;



Header information of this component. This specifies the type and database index.
Information about the properties of polygon.
Refers to the material of the polygon.
Internal use.
Refers to the polygon’s normal vector (negative: use opposite direction). It is an index of a vector you can get by ACAPI_3D_GetComponent.
fpedg, lpedg
Range of indices referring to the polygon contour edges.



Accessing polygons must be base on bodies. First you should get a body by ACAPI_3D_GetComponent and just after is obtainable its polygons.

A polygon component consist of directed edges. You can get those using fpedg, lpedg index range. These indices refer to API_PedgType components, which can be use to retrieve the edges of the given polygon. It may occure that fpedg > lpedg, which means that the polygon has no edge references.

Note that negative pedg value in API_PedgType means opposite direction.

The ivect is an index to an API_VectType component. This is the normal vector of this polygon. If ivect is negative, the direction of the normal vector is the opposite of the stored one.

The status field specifies some properties of the polygon. You can use the bitwise-OR operator (|) to combine any of the following constants:

  • APIPgon_Invis: invisible polygon,
  • APIPgon_Curved: polygon of a curved surface,
  • APIPgon_Concav: concave polygon,
  • APIPgon_PHole: polygon with holes,
  • APIPgon_HolesCnv: hole(s) are convex,
  • APIPgon_Complex: the polygon is concave or with holes.



Version: API 1.3 or later
Header: APIdefs_3D.h


See Also

API_3D_Head, API_BodyType, API_PedgType, API_VectType, API_Component3D, API_AttributeIndex,
3D Manager, API Types