MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / initExampleEntries

Method initExampleEntries

examples/ExampleBrowser/ExampleEntries.cpp:441–468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439}
440
441void ExampleEntriesAll::initExampleEntries()
442{
443 m_data->m_allExamples.clear();
444
445 for (int i = 0; i < gAdditionalRegisteredExamples.size(); i++)
446 {
447 m_data->m_allExamples.push_back(gAdditionalRegisteredExamples[i]);
448 }
449
450 int numDefaultEntries = sizeof(gDefaultExamples) / sizeof(ExampleEntry);
451 for (int i = 0; i < numDefaultEntries; i++)
452 {
453 m_data->m_allExamples.push_back(gDefaultExamples[i]);
454 }
455
456 if (m_data->m_allExamples.size() == 0)
457 {
458 {
459 ExampleEntry e(0, "Empty");
460 m_data->m_allExamples.push_back(e);
461 }
462
463 {
464 ExampleEntry e(1, "Empty", "Empty Description", EmptyExample::CreateFunc);
465 m_data->m_allExamples.push_back(e);
466 }
467 }
468}
469
470void ExampleEntriesAll::registerExampleEntry(int menuLevel, const char* name, const char* description, CommonExampleInterface::CreateFunc* createFunc, int option)
471{

Callers 1

mainFunction · 0.45

Calls 3

clearMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected