void* bodyData = nullptr;
UInt32 vertices[8];
Int32 edges[8];
Int32 polyNormals[1];
UInt32 polygons[1];
coord.
x = -2.0; coord.
y = -2.0; coord.
z = 0.0;
coord.
x = 2.0; coord.
y = -2.0; coord.
z = 0.0;
coord.
x = 2.0; coord.
y = 2.0; coord.
z = 0.0;
coord.
x = -2.0; coord.
y = 2.0; coord.
z = 0.0;
coord.
x = -1.0; coord.
y = -1.0; coord.
z = 0.0;
coord.
x = 1.0; coord.
y = -1.0; coord.
z = 0.0;
coord.
x = 1.0; coord.
y = 1.0; coord.
z = 0.0;
coord.
x = -1.0; coord.
y = 1.0; coord.
z = 0.0;
normal.
x = normal.
y = 0.0; normal.
z = 1.0;
GS::Array<Int32>& polyEdges[] = {
edges[0],
edges[1],
edges[2],
edges[3],
0,
-edges[7],
-edges[6],
-edges[5],
-edges[4]
};
material.attributeIndex = 1;
material.overridden = true;
});
GSErrCode ACAPI_Body_AddEdge(void *bodyData, const UInt32 vertex1, const UInt32 vertex2, Int32 &index)
Adds a vertex to the body data object.
GSErrCode ACAPI_Body_AddPolyNormal(void *bodyData, const API_Vector3D &normal, Int32 &index)
Adds a polygon normal vector to the body data object.
GSErrCode ACAPI_Body_Create(const Modeler::MeshBody *body, const API_OverriddenAttribute *bodyMaterialMapTable, void **bodyData)
Initializes a new body data object for editing.
GSErrCode ACAPI_Body_Finish(void *bodyData, Modeler::MeshBody **body, API_OverriddenAttribute **bodyMaterialMapTable)
Converts the body data object to a format, that can be passed to an API_ElementMemo structure.
GSErrCode ACAPI_Body_AddVertex(void *bodyData, const API_Coord3D &coord, UInt32 &index)
Adds a vertex to the body data object.
GSErrCode ACAPI_Body_Dispose(void **bodyData)
Disposes the body data object.
GSErrCode ACAPI_Body_AddPolygon(void *bodyData, const GS::Array< Int32 > &edges, const Int32 polyNormal, const API_OverriddenAttribute &material, UInt32 &index)
Adds a polygon to the body data object.
GSErrCode ACAPI_CallUndoableCommand(const GS::UniString &undoString, const std::function< GSErrCode()> &command)
Performs an undoable operation.
GSErrCode ACAPI_Element_GetDefaults(API_Element *element, API_ElementMemo *memo)
Retrieves the actual default settings for the element of type.
GSErrCode ACAPI_DisposeElemMemoHdls(API_ElementMemo *memo)
Frees the memory occupied by all of the allocated memo handles.
GSErrCode ACAPI_Element_Create(API_Element *element, API_ElementMemo *memo)
Places a new element into current database.
Real (Cartesian) 3D coordinates of a three-dimensional space.
Definition: APIdefs_Base.h:108
double x
The x factor.
Definition: APIdefs_Base.h:113
double z
The z factor.
Definition: APIdefs_Base.h:125
double y
The y factor.
Definition: APIdefs_Base.h:119
API_ElemType type
The type of the element.
Definition: APIdefs_Elements.h:407
Describes the variable length additional data of elements.
Definition: APIdefs_Elements.h:17660
Modeler::MeshBody * morphBody
Morph element.
Definition: APIdefs_Elements.h:18160
API_OverriddenAttribute * morphMaterialMapTable
Morph element.
Definition: APIdefs_Elements.h:18166
A union collecting all known element types.
Definition: APIdefs_Elements.h:17120
API_Elem_Head header
General element header.
Definition: APIdefs_Elements.h:17126