Skip to content
Snippets Groups Projects
Commit 427dfe87 authored by vahrenkamp's avatar vahrenkamp
Browse files

Fixing bug in normal computation.

git-svn-id: http://svn.code.sf.net/p/simox/code/trunk@197 042f3d55-54a8-47e9-b7fb-15903f145c44
parent 5aaef6b2
No related branches found
No related tags found
No related merge requests found
......@@ -152,9 +152,12 @@ void CoinVisualizationNode::InventorTriangleCB(void* data, SoCallbackAction* act
mm.multVecMatrix(v2->getPoint(), triangle[1]);
mm.multVecMatrix(v3->getPoint(), triangle[2]);
SbVec3f normal[3];
mm.multVecMatrix(v1->getNormal(), normal[0]);
/*mm.multVecMatrix(v1->getNormal(), normal[0]);
mm.multVecMatrix(v2->getNormal(), normal[1]);
mm.multVecMatrix(v3->getNormal(), normal[2]);
mm.multVecMatrix(v3->getNormal(), normal[2]);*/
mm.multDirMatrix(v1->getNormal(), normal[0]);
mm.multDirMatrix(v2->getNormal(), normal[1]);
mm.multDirMatrix(v3->getNormal(), normal[2]);
normal[0] = (normal[0] + normal[1] + normal[2]) / 3.0f;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment