diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-05-25 11:16:00 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-05-25 14:47:49 +0400 |
commit | 08528f577dcb47f570413ce600137f3729a35d94 (patch) | |
tree | 6a3a3b792795383fb9180ec7c730eca2b050bbbf /source/blender/freestyle/intern/view_map/Silhouette.h | |
parent | aef443ab2d27a79160cca0588bc221457572cead (diff) |
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).
Diffstat (limited to 'source/blender/freestyle/intern/view_map/Silhouette.h')
-rw-r--r-- | source/blender/freestyle/intern/view_map/Silhouette.h | 6 |
1 files changed, 3 insertions, 3 deletions
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. */ |