From 1b3948f9aad25fec1923f5ccd36ea525d8e34fb6 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Fri, 12 Feb 2010 23:24:59 +0000 Subject: Further consolidation of the view map creation. Made Controller::_EPSILON constant with the value 1e-6. Previously, the _EPSILON value was computed based on the minimum edge size within the scene being rendered (in some cases, the computed value resulted in zero). This does not seem to make sense, because _EPSILON has been used as a tolerance threshold of floating-point arithmetic errors throughout the view map creation. Since Blender uses single-precision real values for mesh data representations, the new constant _EPSILON value looks more adequate. --- source/blender/freestyle/intern/application/Controller.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'source/blender/freestyle/intern/application') diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp index ad48b30d744..c0e05ba09f4 100755 --- a/source/blender/freestyle/intern/application/Controller.cpp +++ b/source/blender/freestyle/intern/application/Controller.cpp @@ -97,6 +97,7 @@ Controller::Controller() _ProgressBar = new ProgressBar; _SceneNumFaces = 0; _minEdgeSize = DBL_MAX; + _EPSILON = 1e-6; _bboxDiag = 0; _ViewMap = 0; @@ -210,13 +211,8 @@ int Controller::LoadMesh(Render *re, SceneRenderLayer* srl) if(loader.minEdgeSize() < _minEdgeSize) { _minEdgeSize = loader.minEdgeSize(); - _EPSILON = _minEdgeSize*1e-6; - if(_EPSILON < DBL_MIN) - _EPSILON = 0.0; } - cout << "Epsilon computed : " << _EPSILON << endl; - // DEBUG // ScenePrettyPrinter spp; // blenderScene->accept(spp); -- cgit v1.2.3