GetInstanceClassEx
Syntax
// // Strong typing definition // OwlClass GetInstanceClassEx( OwlModel model, OwlInstance owlInstance ); // // Weak typing definition // int64_t __declspec(dllexport) __stdcall GetInstanceClassEx( int64_t model, int64_t owlInstance );
Property model
Size: 64 bit / 8 byte (value)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 GetInstanceClassEx can be used.
#include "./include/engine.h" int64_t model = CreateModel(); if (model) { // // The following setting makes sure all class handled are in an ordered list // In certain cases where several models are open or in case of conversion // between formats this can be handy and / or time efficient. // OrderedHandles(model, nullptr, nullptr, nullptr, 1 + 2 + 4, 1 + 2 + 4); // // Classes // int64_t classAbcd = CreateClass(model, "ABCD"), classCube = CreateClass(model, "Cube"), classMatrix = CreateClass(model, "Matrix"); // // Instances // int64_t instanceAbcd = CreateInstanceEx(model, classAbcd, nullptr), instanceCube = CreateInstanceEx(model, classCube, nullptr), instanceMatrixI = CreateInstanceEx(model, classMatrix, nullptr), instanceMatrixII = CreateInstanceEx(model, classMatrix, nullptr); assert(GetInstanceClassEx(model, instanceAbcd) == classAbcd); assert(GetInstanceClassEx(model, instanceCube) == classCube); assert(GetInstanceClassEx(model, instanceMatrixI) == GetInstanceClassEx(model, instanceMatrixII)); // // The resulting model can be viewed in 3D-Editor.exe // SaveModel(model, "c:\\created\\myFile.bin"); CloseModel(model); }