API_​BodyType

Representation of a 3D body.

    typedef struct {
        API_3D_Head        head;
        API_Elem_Head      parent;
        Int32              status;
        short              color;
        short              filler_0[3];
        API_AttributeIndex iumat;
        float              xmin;
        float              ymin;
        float              zmin;
        float              xmax;
        float              ymax;
        float              zmax;
        Int32              nPgon;
        Int32              nPedg;
        Int32              nEdge;
        Int32              nVert;
        Int32              nVect;
        Int32              filler_1;
        API_Tranmat        tranmat;
    } API_BodyType;

 

Members

head
Header information of this component. This specifies the type and database index.
parent
The floorplan element the body has been converted from.
status
The properties of the body.
color
Refers to the default color of the body edges.
iumat
Refers to the default material of the body polygons.
xmin, ymin, zmin, xmax, ymax, zmax
The six coordinate data of the body’s bounding box.
nPgon
Number of polygons in the body.
nPedg
Number of edge references in the body.
nEdge
Number of edges in the body.
nVert
Number of vertices in the body.
nVect
Number of normal vectors in the body.
tranmat
The base transformation matrix.

 

Remarks

The 3D representation of a particular element is based on API_BodyType structure. One element may hold one or more bodies to describe the 3D geometry. Generally a body is built up from a number of vertices, edges, polygons and normal vectors. This data structure gives you the number of the internal components as well as some status bits, surface properties and a global transformation matrix. You also get a reference to the parent element through an API_Elem_Head structure.

You can get a component of a body, just after you call ACAPI_3D_GetComponent with the appropriate body component. Then you can obtain edges, pgons, vertices etc. of that body. Use indices from 1 to nPgon, nPedg, nEdge, nVert or nVect in parameter of ACAPI_3D_GetComponent function to get a subcomponent.

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

  • APIBody_MulRtxt: more textures are referenced by its materials.
  • APIBody_MulColor: more than one colors referenced by its edges.
  • APIBody_MulMater: more than one materials referenced by its polygons.
  • APIBody_Closed: its geometry is closed.
  • APIBody_Curved: it has smooth polygons.

 

Requirements

Version: API 1.3 or later
Header: APIdefs_3D.h

 

See Also

API_3D_Head, API_PgonType, API_PedgType, API_EdgeType, API_VertType, API_VectType, API_Component3D,
API_Elem_Head, API_Tranmat, API_AttributeIndex,
3D Manager, API Types