GetPerimeter
Note: internally the call does not store its results, any optimization based on known
dependencies between instances need to be implemented on the client.
Note: due to internal structure using already calculated vertex buffer/index buffer does not
give any performance benefits, in opposite to GetVolume and GetArea
Syntax
// // Strong typing definition // double GetPerimeter( OwlInstance owlInstance ); // // Weak typing definition // double __declspec(dllexport) __stdcall GetPerimeter( int64_t owlInstance );
Property owlInstance
Size: 64 bit / 8 byte (value)
Example (based on pure API calls)
Here you can find code snippits that show how the API call GetPerimeter can be used.
#include "./include/engine.h" #include <assert.h> void main() { 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 instanceBox = CreateInstance(classBox, nullptr); double length = 2.8, width = 1.3, height = 1.4; SetDatatypeProperty(instanceBox, propertyLength, &length, 1); SetDatatypeProperty(instanceBox, propertyWidth, &width, 1); SetDatatypeProperty(instanceBox, propertyHeight, &height, 1); double perimeter = GetPerimeter(instanceBox); // // The resulting model can be viewed in 3D-Editor.exe // SaveModel(model, "c:\\created\\myFile.bin"); CloseModel(model); } }