Box
Class
Example (based on GEOM ontology wrapper)
Here you can find code snippits that show how the API call Box can be used.
#include "./include/geom.h" int64_t model = CreateModel(); if (model) { GEOM::Box box = GEOM::Box::Create(model); box.set_length(2.8); box.set_width(1.3); box.set_height(1.4); // // The resulting model can be viewed in 3D-Editor.exe // SaveModel(model, "c:\\created\\myBox.bin"); CloseModel(model); }
Example (based on pure and inline API calls)
Here you can find code snippits that show how the API call Box can be used.
#include "./include/engine.h" int64_t model = CreateModel(); if (model) { // // Classes // int64_t classBox = GetClassByName(model, "Box"); // // Datatype Properties (attributes) // int64_t propertyLength = GetPropertyByName(model, "length"), propertyWidth = GetPropertyByName(model, "width"), propertyHeight = GetPropertyByName(model, "height"); // // Instances (creating) // int64_t myInstanceBox = CreateInstance(classBox); SetDatatypeProperty(myInstanceBox, propertyLength, 2.8); SetDatatypeProperty(myInstanceBox, propertyWidth, 1.3); SetDatatypeProperty(myInstanceBox, propertyHeight, 1.4); // // The resulting model can be viewed in 3D-Editor.exe // SaveModel(model, "c:\\created\\myBox.bin"); CloseModel(model); }
Example (based on pure API calls)
Here you can find code snippits that show how the API call Box can be used.
#include "./include/engine.h" int64_t model = CreateModel(); if (model) { // // Classes // int64_t classBox = GetClassByName(model, "Box"); // // Datatype Properties (attributes) // int64_t propertyLength = GetPropertyByName(model, "length"), propertyWidth = GetPropertyByName(model, "width"), propertyHeight = GetPropertyByName(model, "height"); // // Instances (creating) // int64_t myInstanceBox = CreateInstance(classBox, nullptr); double length = 2.8, width = 1.3, height = 1.4; SetDatatypeProperty(myInstanceBox, propertyLength, &length, 1); SetDatatypeProperty(myInstanceBox, propertyWidth, &width, 1); SetDatatypeProperty(myInstanceBox, propertyHeight, &height, 1); // // The resulting model can be viewed in 3D-Editor.exe // SaveModel(model, "c:\\created\\myBox.bin"); CloseModel(model); }