If input class is zero, the handle will point to the first relevant class.
If all classes are past (or no relevant classes are found), the function will return 0.
Syntax
// // Strong typing definition // OwlClass GetClassesByIterator( OwlModel model, OwlClass owlClass ); // // Weak typing definition // int64_t __declspec(dllexport) __stdcall GetClassesByIterator( int64_t model, int64_t owlClass );
Property model
Size: 64 bit / 8 byte (value)Property owlClass
Size: 64 bit / 8 byte (value)
Example (based on pure API calls)
Here you can find code snippets that show how the API call GetClassesByIterator can be used.
#include "./include/engine.h" int64_t GetClassCnt(int64_t model) { int64_t classCnt = 0, myIteratedClass = GetClassesByIterator(model, 0); while (myIteratedClass) { char * className = nullptr; GetNameOfClass(myIteratedClass, &className); // // The name of the class can be checked by placing a breakpoint after this point while debugging // myIteratedClass = GetClassesByIterator(model, myIteratedClass); classCnt++; } return classCnt; } int _tmain(int argc, _TCHAR* argv[]) { int64_t model = CreateModel(); if (model) { int64_t classCnt = GetClassCnt(model); // // Add a new class // CreateClass(model, "CreatedClassToTestClassCnt"); assert(GetClassCnt(model) == classCnt + 1); int64_t classCntThroughAPI = 0; OrderedHandles(model, &classCntThroughAPI, nullptr, nullptr, 0, 0); assert(GetClassCnt(model) == classCntThroughAPI); CloseModel(model); } return 0; }