Archicad 27 C++ API
Loading...
Searching...
No Matches
API_BodyType Struct Reference

Representation of a 3D body. More...

#include <APIdefs_3D.h>

Public Attributes

API_3D_Head head
 Header information of this component. This specifies the type and database index.
 
API_Elem_Head parent
 The floorplan element the body has been converted from.
 
Int32 status
 The properties of the body.
 
short color
 Refers to the default color of the body edges.
 
Int32 iumat
 Refers to the default material of the body polygons.
 
float xmin
 Minimum of the bounding box in X direction.
 
float ymin
 Minimum of the bounding box in Y direction.
 
float zmin
 Minimum of the bounding box in Z direction.
 
float xmax
 Maximum of the bounding box in X direction.
 
float ymax
 Maximum of the bounding box in Y direction.
 
float zmax
 Maximum of the bounding box in Z direction.
 
Int32 nPgon
 Number of polygons in the body.
 
Int32 nPedg
 Number of edge references in the body.
 
Int32 nEdge
 Number of edges in the body.
 
Int32 nVert
 Number of vertices in the body.
 
Int32 nVect
 Number of normal vectors in the body.
 
API_Tranmat tranmat
 The base transformation matrix.
 

Detailed Description

Representation of a 3D body.

Remarks
The 3D representation of a particular element is based on the API_BodyType structure. One element may hold one or more bodies to describe the 3D geometry. Generally, a body is built up from several vertices, edges, polygons, and normal vectors. This data structure gives you the number of internal components, 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 body component just after you call ACAPI_ModelAccess_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 the parameter of ACAPI_ModelAccess_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.