replace VECCOPY and QUATCOPY with inline funcs.

This commit is contained in:
2011-10-28 12:40:15 +00:00
parent 565fcd8907
commit 0d63bb005f
22 changed files with 206 additions and 220 deletions

View File

@@ -1157,7 +1157,7 @@ PyObject *newQuaternionObject(float *quat, int type, PyTypeObject *base_type)
unit_qt(self->quat);
}
else {
QUATCOPY(self->quat, quat);
copy_qt_qt(self->quat, quat);
}
self->wrapped = Py_NEW;
}

View File

@@ -628,14 +628,14 @@ static PyObject *M_Geometry_intersect_point_line(PyObject *UNUSED(self), PyObjec
return NULL;
/* accept 2d verts */
if (pt->size==3) { VECCOPY(pt_in, pt->vec);}
else { pt_in[2]=0.0; VECCOPY2D(pt_in, pt->vec) }
if (pt->size==3) { copy_v3_v3(pt_in, pt->vec);}
else { pt_in[2]=0.0; copy_v2_v2(pt_in, pt->vec); }
if (line_1->size==3) { VECCOPY(l1, line_1->vec);}
else { l1[2]=0.0; VECCOPY2D(l1, line_1->vec) }
if (line_1->size==3) { copy_v3_v3(l1, line_1->vec);}
else { l1[2]=0.0; copy_v2_v2(l1, line_1->vec); }
if (line_2->size==3) { VECCOPY(l2, line_2->vec);}
else { l2[2]=0.0; VECCOPY2D(l2, line_2->vec) }
if (line_2->size==3) { copy_v3_v3(l2, line_2->vec);}
else { l2[2]=0.0; copy_v2_v2(l2, line_2->vec); }
/* do the calculation */
lambda= closest_to_line_v3(pt_out, pt_in, l1, l2);