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

Function ComputePositionEpsilon

code/PostProcessing/ProcessHelper.cpp:136–143  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

134
135// -------------------------------------------------------------------------------
136ai_real ComputePositionEpsilon(const aiMesh *pMesh) {
137 const ai_real epsilon = ai_real(1e-4);
138
139 // calculate the position bounds so we have a reliable epsilon to check position differences against
140 aiVector3D minVec, maxVec;
141 ArrayBounds(pMesh->mVertices, pMesh->mNumVertices, minVec, maxVec);
142 return (maxVec - minVec).Length() * epsilon;
143}
144
145// -------------------------------------------------------------------------------
146ai_real ComputePositionEpsilon(const aiMesh *const *pMeshes, size_t num) {

Callers 6

ComputeNormalsMethod · 0.85
InternSubdivideMethod · 0.85
ExecuteMethod · 0.85
ProcessMeshMethod · 0.85
GenMeshVertexNormalsMethod · 0.85
ExecuteMethod · 0.85

Calls 4

ArrayBoundsFunction · 0.85
minFunction · 0.70
maxFunction · 0.70
LengthMethod · 0.45

Tested by

no test coverage detected