SetBoundingBoxReference
The transformationMatrix has 12 double values: _11, _12, _13, _21, _22, _23,
_31, _32, _33, _41, _42, _43.
The startVector is the leftundernear vector and the endVector is the
rightupperfar vector, in all cases values are doubles (64 bit).
Syntax
// Visual Studio for Windows public: void __declspec(dllexport) __stdcall SetBoundingBoxReference( __int64 owlInstance, double * transformationMatrix, double * startVector, double * endVector ); // Linux, OS-X and non-Visual Studio Windows solutions public: void SetBoundingBoxReference( int64_t owlInstance, double * transformationMatrix, double * startVector, double * endVector );
Property owlInstance
Size: 64 bit / 8 byte (value)Property transformationMatrix
Size: 64 bit / 8 byte (reference)Property startVector
Size: 64 bit / 8 byte (reference)Property endVector
Size: 64 bit / 8 byte (reference)
Example
Here you can find code snippits that show how the API call SetBoundingBoxReference can be used.
#include "engine/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 transformationMatrix[12], startVector[3], endVector[3]; SetBoundingBoxReference(instanceBox, transformationMatrix, startVector, endVector); UpdateInstance(instanceBox); assert(endVector[0] == 2.8); length = 4.1; SetDatatypeProperty(instanceBox, propertyLength, &length, 1); assert(endVector[0] == 2.8); UpdateInstance(instanceBox); assert(endVector[0] == 4.1); // // The resulting model can be viewed in 3D-Editor.exe // SaveModel(model, "c:\\created\\myFile.bin"); CloseModel(model); } }