Sketcher: fix incorrect datum text flip for non xy-plane sketches

This commit is contained in:
mrlukeparry
2012-07-17 23:15:58 +02:00
committed by logari81
parent f201ea0b82
commit 14562ba540

View File

@@ -834,12 +834,12 @@ void SoDatumLabel::GLRender(SoGLRenderAction * action)
const SbViewportRegion & vpr = SoViewportRegionElement::get(state);
SoGetMatrixAction * getmatrixaction = new SoGetMatrixAction(vpr);
getmatrixaction->apply(this);
getmatrixaction->apply(action);
SbMatrix transform = getmatrixaction->getMatrix();
transform.multVecMatrix(surfNorm, surfNorm);
bool flip = surfNorm.dot(z) > 0;
bool flip = surfNorm.dot(z) > FLT_EPSILON;
glDisable(GL_DEPTH_TEST);
glEnable(GL_TEXTURE_2D); // Enable Textures