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>2010-10-15 09:18:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-15 09:18:45 +0400
commit25bbf99a79b0a1fa324dcd8d49bf80807b2d9672 (patch)
tree810fc892538ae4ae98f5196554ec8a5d874ea7ba /source/blender/editors/mesh/editmesh_add.c
parent68dea6591d4a08c50ade96ec58f00853d0d5340a (diff)
replace SIDE_OF_LINE macro with line_point_side_v2() inline function.
made a number of files build without unused warnings.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_add.c')
-rw-r--r--source/blender/editors/mesh/editmesh_add.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index 2501a01d0e6..ad4c02c834c 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -113,7 +113,6 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event)
EditVert *eve;
float min[3], max[3];
int done= 0;
- int rot_src= RNA_boolean_get(op->ptr, "rotate_source");
em_setup_viewcontext(C, &vc);
@@ -130,14 +129,13 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event)
/* call extrude? */
if(done) {
+ int rot_src= RNA_boolean_get(op->ptr, "rotate_source");
EditEdge *eed;
float vec[3], cent[3], mat[3][3];
float nor[3]= {0.0, 0.0, 0.0};
/* 2D normal calc */
float mval_f[2]= {(float)event->mval[0], (float)event->mval[1]};
-
-#define SIDE_OF_LINE(pa,pb,pp) ((pa[0]-pp[0])*(pb[1]-pp[1]))-((pb[0]-pp[0])*(pa[1]-pp[1]))
done= 0;
@@ -155,7 +153,7 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event)
*
* accumulate the screenspace normal in 2D,
* with screenspace edge length weighting the result. */
- if(SIDE_OF_LINE(co1, co2, mval_f) >= 0.0f) {
+ if(line_point_side_v2(co1, co2, mval_f) >= 0.0f) {
nor[0] += (co1[1] - co2[1]);
nor[1] += -(co1[0] - co2[0]);
}
@@ -167,8 +165,6 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event)
}
}
-#undef SIDE_OF_LINE
-
if(done) {
float view_vec[3], cross[3];