Added handling of possible zero divisor
This commit is contained in:
parent
77812b32e0
commit
1a10795198
@ -236,7 +236,7 @@ osg::Vec3 VBSPGeometry::getNormalFromEdges(int row, int col,
|
||||
|
||||
// Scale the final normal according to how many triangle normals are
|
||||
// contributing
|
||||
finalNormal *= (1.0f / (float)normalCount);
|
||||
if (normalCount>0) finalNormal *= (1.0f / (float)normalCount);
|
||||
|
||||
return finalNormal;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user