From 08528f577dcb47f570413ce600137f3729a35d94 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Sun, 25 May 2014 16:16:00 +0900 Subject: Freestyle: Partial fix for thinning strokes due to flipping stroke directions at TVertices. A description of the problem is found in https://developer.blender.org/T36425#19 . The cause of the issue was identified as roudning errors in Operators::createStroke() due to insufficient numerical precision. Precision promotion from float to double was done in the return values of getPoint3D/2D methods in Interface0D and its subclasses in C++ (data members stored in the 0D classes have already been in double precision). --- source/blender/freestyle/intern/view_map/Silhouette.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/freestyle/intern/view_map/Silhouette.h') diff --git a/source/blender/freestyle/intern/view_map/Silhouette.h b/source/blender/freestyle/intern/view_map/Silhouette.h index e747f9c3e68..2d0acde3f2b 100644 --- a/source/blender/freestyle/intern/view_map/Silhouette.h +++ b/source/blender/freestyle/intern/view_map/Silhouette.h @@ -103,7 +103,7 @@ public: // Implementation of Interface0D } /*! Returns the 3D point. */ - virtual Vec3f getPoint3D() const + virtual Vec3r getPoint3D() const { return _Point3D; } @@ -127,9 +127,9 @@ public: // Implementation of Interface0D } /*! Returns the 2D point. */ - virtual Vec2f getPoint2D() const + virtual Vec2r getPoint2D() const { - return Vec2f((float)_Point2D.x(), (float)_Point2D.y()); + return Vec2f(_Point2D.x(), _Point2D.y()); } /*! Returns the FEdge that lies between this Svertex and the Interface0D given as argument. */ -- cgit v1.2.3