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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-02-12 02:26:22 +0300
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-02-12 02:26:22 +0300
commita6a5ce4f7b5c2bde71715b11052d2ce30a34cb6d (patch)
tree12a40adc00acaa2a2e20795d8bf5dca134feb5ae /source/blender/freestyle/intern/geometry/SweepLine.h
parented266e868cee7e922f028227ee22492d7e830253 (diff)
More consolidation of the view map creation.
Made an attempt to fix "2D intersection out of range" warnings. These warnings may cause "3D intersection out of range" warnings, which often lead to a crash.
Diffstat (limited to 'source/blender/freestyle/intern/geometry/SweepLine.h')
-rwxr-xr-xsource/blender/freestyle/intern/geometry/SweepLine.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/freestyle/intern/geometry/SweepLine.h b/source/blender/freestyle/intern/geometry/SweepLine.h
index 386ba3a7388..cf4c86d006d 100755
--- a/source/blender/freestyle/intern/geometry/SweepLine.h
+++ b/source/blender/freestyle/intern/geometry/SweepLine.h
@@ -226,8 +226,9 @@ public:
inline void process(Point& p,
vector<Segment<T,Point>*>& segments,
- binary_rule<Segment<T,Point>,Segment<T,Point> >& binrule
- //binary_rule<Segment<T,Point>,Segment<T,Point> >& binrule = binary_rule<Segment<T,Point>,Segment<T,Point> >()
+ binary_rule<Segment<T,Point>,Segment<T,Point> >& binrule,
+ //binary_rule<Segment<T,Point>,Segment<T,Point> >& binrule = binary_rule<Segment<T,Point>,Segment<T,Point> >(),
+ real epsilon = M_EPSILON
)
{
// first we remove the segments that need to be removed and then
@@ -247,13 +248,14 @@ public:
s!=send;
s++)
{
- add((*s), binrule);
+ add((*s), binrule, epsilon);
}
}
inline void add(Segment<T,Point>* S,
- binary_rule<Segment<T,Point>,Segment<T,Point> >& binrule
- //binary_rule<Segment<T,Point>,Segment<T,Point> >& binrule = binary_rule<Segment<T,Point>, Segment<T,Point> >()
+ binary_rule<Segment<T,Point>,Segment<T,Point> >& binrule,
+ //binary_rule<Segment<T,Point>,Segment<T,Point> >& binrule = binary_rule<Segment<T,Point>, Segment<T,Point> >(),
+ real epsilon
)
{
real t,u;
@@ -298,7 +300,7 @@ public:
if(S->CommonVertex(*currentS, CP))
continue; // the two edges have a common vertex->no need to check
- if(GeomUtils::intersect2dSeg2dSegParametric(v0, v1, v2, v3, t, u) == GeomUtils::DO_INTERSECT)
+ if(GeomUtils::intersect2dSeg2dSegParametric(v0, v1, v2, v3, t, u, epsilon) == GeomUtils::DO_INTERSECT)
{
// create the intersection
Intersection<Segment<T,Point> > * inter = new Intersection<Segment<T,Point> >(S,t,currentS,u);