bugfix for LineIntersectLine()

- was imperfect calculation for points marking shortest distance for non-crossing lines in 3d
This commit is contained in:
Remigiusz Fiedler 2009-09-16 22:12:23 +00:00
parent 90d8088e53
commit 591a30dab0
2 changed files with 2 additions and 2 deletions

@ -4715,7 +4715,7 @@ int LineIntersectLine(float v1[3], float v2[3], float v3[3], float v4[3], float
VecSubf(c, v3t, v1);
VecSubf(a, v2, v1);
VecSubf(b, v4t, v3);
VecSubf(b, v4t, v3t);
Crossf(ab, a, b);
Crossf(cb, c, b);

@ -912,7 +912,7 @@ static PyObject *M_Mathutils_LineIntersect( PyObject * self, PyObject * args )
PyErr_SetString( PyExc_TypeError, "expected 4 vector types\n" );
return NULL;
}
if( vec1->size != vec2->size || vec1->size != vec3->size || vec1->size != vec2->size) {
if( vec1->size != vec2->size || vec1->size != vec3->size || vec3->size != vec2->size) {
PyErr_SetString( PyExc_TypeError,"vectors must be of the same size\n" );
return NULL;
}