GetInstanceClass
Syntax
// // Strong typing definition // OwlClass GetInstanceClass( OwlInstance owlInstance ); // // Weak typing definition // int64_t __declspec(dllexport) __stdcall GetInstanceClass( 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 GetInstanceClass can be used.
#include "./include/engine.h" int64_t model = CreateModel(); if (model) { // // Classes // int64_t classAbcd = CreateClass(model, "ABCD"), classCube = CreateClass(model, "Cube"), classMatrix = CreateClass(model, "Matrix"); // // Instances // int64_t instanceAbcd = CreateInstance(classAbcd, nullptr), instanceCube = CreateInstance(classCube, nullptr), instanceMatrixI = CreateInstance(classMatrix, nullptr), instanceMatrixII = CreateInstance(classMatrix, nullptr); assert(GetInstanceClass(instanceAbcd) == classAbcd); assert(GetInstanceClass(instanceCube) == classCube); assert(GetInstanceClass(instanceMatrixI) == GetInstanceClass(instanceMatrixII)); // // The resulting model can be viewed in 3D-Editor.exe // SaveModel(model, "c:\\created\\myFile.bin"); CloseModel(model); }