@ttyy wrote:
Question is referring to line 497 in ofxAssimpModelLoader.cpp:
void ofxAssimpModelLoader::updateModelMatrix() { modelMatrix.makeIdentityMatrix(); modelMatrix.glTranslate(pos); modelMatrix.glRotate(180, 0, 0, 1); // <----------- this line if(normalizeScale) { modelMatrix.glScale(normalizedScale , normalizedScale, normalizedScale); } for(int i = 0; i < (int)rotAngle.size(); i++){ // @julapy - not sure why rotAngle isn't a ofVec4f. modelMatrix.glRotate(rotAngle[i], rotAxis[i].x, rotAxis[i].y, rotAxis[i].z); } modelMatrix.glScale(scale.x, scale.y, scale.z); }
If I comment out line 497, getSceneMin(), getSceneMax(), and getSceneCenter() return values that correspond to the onscreen model location/dimensions.
Otherwise those values are rotated 180 around Z compared to the model.
model and calculated bounding box
after removing line 497 vs. before
Posts: 1
Participants: 1