Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-05-21 14:00:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-05-21 14:06:30 +0300
commite37c4e5819aec1f853fdd71cf60004aa2363f7d9 (patch)
tree1217d8ac654774e34ebeefa917a144f6524ba84c /source/blender/blenlib/BLI_quadric.h
parent6ee653352bbbc8e358969426186b540f98a9aca0 (diff)
Fix T44780: Decimate planar creates concave edges
Float precision was causing problems for decimate, small faces that create a nearly flat surface were detected as having no 'cost' to collapse.
Diffstat (limited to 'source/blender/blenlib/BLI_quadric.h')
-rw-r--r--source/blender/blenlib/BLI_quadric.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenlib/BLI_quadric.h b/source/blender/blenlib/BLI_quadric.h
index 251469ab88f..eaf9c7a0738 100644
--- a/source/blender/blenlib/BLI_quadric.h
+++ b/source/blender/blenlib/BLI_quadric.h
@@ -31,14 +31,14 @@
*/
typedef struct Quadric {
- float a2, ab, ac, ad,
- b2, bc, bd,
- c2, cd,
- d2;
+ double a2, ab, ac, ad,
+ b2, bc, bd,
+ c2, cd,
+ d2;
} Quadric;
/* conversion */
-void BLI_quadric_from_plane(Quadric *q, const float v[4]);
+void BLI_quadric_from_plane(Quadric *q, const double v[4]);
void BLI_quadric_to_tensor_m3(const Quadric *q, float m[3][3]);
void BLI_quadric_to_vector_v3(const Quadric *q, float v[3]);
@@ -47,10 +47,10 @@ void BLI_quadric_clear(Quadric *q);
/* math */
void BLI_quadric_add_qu_qu(Quadric *a, const Quadric *b);
void BLI_quadric_add_qu_ququ(Quadric *r, const Quadric *a, const Quadric *b);
-void BLI_quadric_mul(Quadric *a, const float scalar);
+void BLI_quadric_mul(Quadric *a, const double scalar);
/* solve */
-float BLI_quadric_evaluate(const Quadric *q, const float v[3]);
+double BLI_quadric_evaluate(const Quadric *q, const float v_fl[3]);
bool BLI_quadric_optimize(const Quadric *q, float v[3], const float epsilon);
#endif /* __BLI_QUADRIC_H__ */