Transformation
Class
class GeometricItem relation material range Material, cardinality [0, 1] class Transformation relation matrix range Matrix, cardinality [0, 1] relation object range GeometricItem, cardinality [0, 1] property recalculateBBox range bool, cardinality [0, 1]
Example (based on pure API calls)
Here you can find code snippits that show how the API call Transformation can be used.
#include "./include/engine.h" int64_t model = CreateModel(); if (model) { // // Classes // int64_t classCylinder = GetClassByName(model, "Cylinder"), classMatrix = GetClassByName(model, "Matrix"), classTransformation = GetClassByName(model, "Transformation"); // // Object Properties (relations) // int64_t propertyMatrix = GetPropertyByName(model, "matrix"), propertyObject = GetPropertyByName(model, "object"); // // Datatype Properties (attributes) // int64_t property_41 = GetPropertyByName(model, "_41"), property_42 = GetPropertyByName(model, "_42"), property_43 = GetPropertyByName(model, "_43"), propertyLength = GetPropertyByName(model, "length"), propertyRadius = GetPropertyByName(model, "radius"), propertySegmentationParts = GetPropertyByName(model, "segmentationParts"); // // Instances (creating) // int64_t myInstanceCylinder = CreateInstance(classCylinder, nullptr), myInstanceMatrix = CreateInstance(classMatrix, nullptr), myInstanceTransformation = CreateInstance(classTransformation, nullptr); SetObjectProperty(myInstanceTransformation, propertyObject, &myInstanceCylinder, 1); SetObjectProperty(myInstanceTransformation, propertyMatrix, &myInstanceMatrix, 1); double length = 2.8, radius = 1.3; int64_t segmentationParts = 36; SetDatatypeProperty(myInstanceCylinder, propertyLength, &length, 1); SetDatatypeProperty(myInstanceCylinder, propertyRadius, &radius, 1); SetDatatypeProperty(myInstanceCylinder, propertySegmentationParts, &segmentationParts, 1); double offsetX = 3.3, offsetY = -1.2, offsetZ = 0.5; SetDatatypeProperty(myInstanceMatrix, property_41, &offsetX, 1); SetDatatypeProperty(myInstanceMatrix, property_42, &offsetY, 1); SetDatatypeProperty(myInstanceMatrix, property_43, &offsetZ, 1); // // The resulting model can be viewed in 3D-Editor.exe // SaveModel(model, "c:\\created\\myTransformation.bin"); CloseModel(model); }