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

Function FindAABBTransformed

code/PostProcessing/ProcessHelper.cpp:75–84  ·  view source on GitHub ↗

-------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

73
74// -------------------------------------------------------------------------------
75void FindAABBTransformed(const aiMesh *mesh, aiVector3D &min, aiVector3D &max,
76 const aiMatrix4x4 &m) {
77 min = aiVector3D(ai_real(10e10), ai_real(10e10), ai_real(10e10));
78 max = aiVector3D(ai_real(-10e10), ai_real(-10e10), ai_real(-10e10));
79 for (unsigned int i = 0; i < mesh->mNumVertices; ++i) {
80 const aiVector3D v = m * mesh->mVertices[i];
81 min = std::min(v, min);
82 max = std::max(v, max);
83 }
84}
85
86// -------------------------------------------------------------------------------
87void FindMeshCenter(aiMesh *mesh, aiVector3D &out, aiVector3D &min, aiVector3D &max) {

Callers 1

Calls 3

aiVector3DClass · 0.85
minFunction · 0.70
maxFunction · 0.70

Tested by

no test coverage detected