From 160c65845dc52b2c705b1ead6e260a399fdccadb Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Wed, 30 Jul 2014 17:08:31 +0900 Subject: Freestyle: minor optimization for space in the FEdgeXDetector. Member variables and auto variables were changed from real (double) to float in most part of the FEdgeXDetector (except for curvature computations). --- .../freestyle/intern/application/Controller.cpp | 2 +- .../blender/freestyle/intern/application/Controller.h | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 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 6a24a47608b..e7eb25f3e62 100644 --- a/source/blender/freestyle/intern/application/Controller.cpp +++ b/source/blender/freestyle/intern/application/Controller.cpp @@ -469,7 +469,7 @@ void Controller::ComputeViewMap() // Restore the context of view: // we need to perform all these operations while the // 3D context is on. - Vec3r vp(freestyle_viewpoint[0], freestyle_viewpoint[1], freestyle_viewpoint[2]); + Vec3f vp(freestyle_viewpoint[0], freestyle_viewpoint[1], freestyle_viewpoint[2]); #if 0 if (G.debug & G_DEBUG_FREESTYLE) { diff --git a/source/blender/freestyle/intern/application/Controller.h b/source/blender/freestyle/intern/application/Controller.h index a09964a4e79..646c74f6c9a 100644 --- a/source/blender/freestyle/intern/application/Controller.h +++ b/source/blender/freestyle/intern/application/Controller.h @@ -136,12 +136,12 @@ public: void setComputeSteerableViewMapFlag(bool iBool); bool getComputeSteerableViewMapFlag() const; - void setCreaseAngle(real angle) {_creaseAngle = angle;} - real getCreaseAngle() const {return _creaseAngle;} - void setSphereRadius(real s) {_sphereRadius = s;} - real getSphereRadius() const {return _sphereRadius;} - void setSuggestiveContourKrDerivativeEpsilon(real dkr) {_suggestiveContourKrDerivativeEpsilon = dkr;} - real getSuggestiveContourKrDerivativeEpsilon() const {return _suggestiveContourKrDerivativeEpsilon;} + void setCreaseAngle(float angle) {_creaseAngle = angle;} + float getCreaseAngle() const {return _creaseAngle;} + void setSphereRadius(float s) {_sphereRadius = s;} + float getSphereRadius() const {return _sphereRadius;} + void setSuggestiveContourKrDerivativeEpsilon(float dkr) {_suggestiveContourKrDerivativeEpsilon = dkr;} + float getSuggestiveContourKrDerivativeEpsilon() const {return _suggestiveContourKrDerivativeEpsilon;} void setModelsDir(const string& dir); string getModelsDir() const; @@ -243,9 +243,9 @@ private: bool _ComputeRidges; bool _ComputeSuggestive; bool _ComputeMaterialBoundaries; - real _creaseAngle; - real _sphereRadius; - real _suggestiveContourKrDerivativeEpsilon; + float _creaseAngle; + float _sphereRadius; + float _suggestiveContourKrDerivativeEpsilon; bool _ComputeSteerableViewMap; -- cgit v1.2.3