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-10-24 20:10:45 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-10-24 20:10:45 +0400
commitbc1b41eca5eeb0e4013371e2d3fc1b283254fa14 (patch)
treeb73c3c7fda1b02a521901f0e1088d1c5a5b98b73 /source/blender/freestyle/intern/stroke/Curve.cpp
parent3b2515ba0e71aeefb7ba43d7cede9fb05259b7f6 (diff)
* Another attempt to fix the bug partly addressed in revision 31419.
* Fix for the missing function declaration of strcpy. This caused a linker error in the Debug build with x64 VC 2008 and CMake.
Diffstat (limited to 'source/blender/freestyle/intern/stroke/Curve.cpp')
-rwxr-xr-xsource/blender/freestyle/intern/stroke/Curve.cpp25
1 files changed, 21 insertions, 4 deletions
diff --git a/source/blender/freestyle/intern/stroke/Curve.cpp b/source/blender/freestyle/intern/stroke/Curve.cpp
index 92af05bf6e7..5d5cfd98cdc 100755
--- a/source/blender/freestyle/intern/stroke/Curve.cpp
+++ b/source/blender/freestyle/intern/stroke/Curve.cpp
@@ -84,8 +84,9 @@ CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3)
__B = iB->A();
_t2d = t3;
}
- else if(iA->A() == iB->A() || (iA->A() != 0 && iB->A() != 0 && (iA->A()->point3d() - iB->A()->point3d()).norm() < 1e-6))
+ else if(iA->A() == iB->A())
{
+iA_A_eq_iB_A:
if(iA->t2d() == 0){
__A = iB->A();
__B = iB->B();
@@ -96,8 +97,9 @@ CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3)
_t2d = t3;
}
}
- else if(iA->B() == iB->B() || (iA->B() != 0 && iB->B() != 0 && (iA->B()->point3d() - iB->B()->point3d()).norm() < 1e-6))
+ else if(iA->B() == iB->B())
{
+iA_B_eq_iB_B:
if(iA->t2d() == 1){
__A = iB->A();
__B = iB->B();
@@ -108,8 +110,9 @@ CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3)
_t2d = t3;
}
}
- else if(iA->B() == iB->A() || (iA->B() != 0 && iB->A() != 0 && (iA->B()->point3d() - iB->A()->point3d()).norm() < 1e-6))
+ else if(iA->B() == iB->A())
{
+iA_B_eq_iB_A:
if((iA->t2d() != 1.f) && (iB->t2d() == 0.f))
{
__A = iA->A();
@@ -124,7 +127,21 @@ CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3)
//_t2d = t3;
_t2d=t2*t3;
}
-
+ }
+ else if(iA->A() != 0 && iB->A() != 0 && (iA->A()->point3d() - iB->A()->point3d()).norm() < 1e-6)
+ {
+ goto iA_A_eq_iB_A;
+ }
+ else if(iA->B() != 0 && iB->B() != 0 && (iA->B()->point3d() - iB->B()->point3d()).norm() < 1e-6)
+ {
+ goto iA_B_eq_iB_B;
+ }
+ else if(iA->B() != 0 && iB->A() != 0 && (iA->B()->point3d() - iB->A()->point3d()).norm() < 1e-6)
+ {
+ goto iA_B_eq_iB_A;
+ }
+ if (!__A || !__B) {
+ cerr << "Fatal error in CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3)" << endl;
}
assert(__A != 0 && __B != 0);