MCPcopy Create free account
hub / github.com/assimp/assimp / loadasset

Function loadasset

samples/SimpleOpenGL/Sample_SimpleOpenGL.c:341–355  ·  view source on GitHub ↗

---------------------------------------------------------------------------- */

Source from the content-addressed store, hash-verified

339
340/* ---------------------------------------------------------------------------- */
341int loadasset (const char* path)
342{
343 /* we are taking one of the postprocessing presets to avoid
344 spelling out 20+ single postprocessing flags here. */
345 scene = aiImportFile(path,aiProcessPreset_TargetRealtime_MaxQuality);
346
347 if (scene) {
348 get_bounding_box(&scene_min,&scene_max);
349 scene_center.x = (scene_min.x + scene_max.x) / 2.0f;
350 scene_center.y = (scene_min.y + scene_max.y) / 2.0f;
351 scene_center.z = (scene_min.z + scene_max.z) / 2.0f;
352 return 0;
353 }
354 return 1;
355}
356
357/* ---------------------------------------------------------------------------- */
358int main(int argc, char **argv)

Callers 1

mainFunction · 0.85

Calls 2

aiImportFileFunction · 0.85
get_bounding_boxFunction · 0.70

Tested by

no test coverage detected