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:
Diffstat (limited to 'source/blender/bmesh/tools/bmesh_bevel.c')
-rw-r--r--source/blender/bmesh/tools/bmesh_bevel.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index 4aa55d9324b..d781f9c3572 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -380,7 +380,7 @@ static BMFace *bev_create_ngon(BMesh *bm, BMVert **vert_arr, const int totv,
interp_f = facerep;
}
if (interp_f)
- BM_loop_interp_from_face(bm, l, interp_f, TRUE, TRUE);
+ BM_loop_interp_from_face(bm, l, interp_f, true, true);
i++;
}
}
@@ -504,7 +504,7 @@ static BMFace *bev_create_quad_straddle(BMesh *bm, BMVert *v1, BMVert *v2, BMVer
else
facerep = f2;
if (facerep)
- BM_loop_interp_from_face(bm, l, facerep, TRUE, TRUE);
+ BM_loop_interp_from_face(bm, l, facerep, true, true);
}
return f;
}
@@ -831,10 +831,10 @@ static void offset_in_two_planes(BevelParams *bp, EdgeHalf *e1, EdgeHalf *e2, Ed
}
}
-/* Offset by e->offset in plane with normal plane_no, on left if left==TRUE,
+/* Offset by e->offset in plane with normal plane_no, on left if left==true,
* else on right. If no is NULL, choose an arbitrary plane different
* from eh's direction. */
-static void offset_in_plane(EdgeHalf *e, const float plane_no[3], int left, float r[3])
+static void offset_in_plane(EdgeHalf *e, const float plane_no[3], bool left, float r[3])
{
float dir[3], no[3], fdir[3];
BMVert *v;
@@ -1007,8 +1007,8 @@ static int bev_ccw_test(BMEdge *a, BMEdge *b, BMFace *f)
/* Fill matrix r_mat so that a point in the sheared parallelogram with corners
* va, vmid, vb (and the 4th that is implied by it being a parallelogram)
* is the result of transforming the unit square by multiplication with r_mat.
- * If it can't be done because the parallelogram is degenerate, return FALSE
- * else return TRUE.
+ * If it can't be done because the parallelogram is degenerate, return false
+ * else return true.
* Method:
* Find vo, the origin of the parallelogram with other three points va, vmid, vb.
* Also find vd, which is in direction normal to parallelogram and 1 unit away
@@ -1024,8 +1024,8 @@ static int bev_ccw_test(BMEdge *a, BMEdge *b, BMFace *f)
* and B has the right side as columns - both extended into homogeneous coords.
* So M = B*(Ainverse). Doing Ainverse by hand gives the code below.
*/
-static int make_unit_square_map(const float va[3], const float vmid[3], const float vb[3],
- float r_mat[4][4])
+static bool make_unit_square_map(const float va[3], const float vmid[3], const float vb[3],
+ float r_mat[4][4])
{
float vo[3], vd[3], vb_vmid[3], va_vmid[3], vddir[3];
@@ -1052,10 +1052,10 @@ static int make_unit_square_map(const float va[3], const float vmid[3], const fl
sub_v3_v3(&r_mat[3][0], vmid);
r_mat[3][3] = 1.0f;
- return TRUE;
+ return true;
}
else
- return FALSE;
+ return false;
}
/* Like make_unit_square_map, but this one makes a matrix that transforms the
@@ -1406,7 +1406,7 @@ static void build_boundary(BevelParams *bp, BevVert *bv, bool construct)
if (bv->edgecount == 2 && bv->selcount == 1) {
/* special case: beveled edge meets non-beveled one at valence 2 vert */
no = e->fprev ? e->fprev->no : (e->fnext ? e->fnext->no : NULL);
- offset_in_plane(e, no, TRUE, co);
+ offset_in_plane(e, no, true, co);
if (construct) {
v = add_new_bound_vert(mem_arena, vm, co);
v->efirst = v->elast = v->ebev = e;
@@ -1416,7 +1416,7 @@ static void build_boundary(BevelParams *bp, BevVert *bv, bool construct)
adjust_bound_vert(e->leftv, co);
}
no = e->fnext ? e->fnext->no : (e->fprev ? e->fprev->no : NULL);
- offset_in_plane(e, no, FALSE, co);
+ offset_in_plane(e, no, false, co);
if (construct) {
v = add_new_bound_vert(mem_arena, vm, co);
v->efirst = v->elast = e;
@@ -1706,7 +1706,7 @@ static BoundVert *pipe_test(BevVert *bv)
for (e = &bv->edges[0]; e != &bv->edges[bv->edgecount]; e++) {
if (e->fnext) {
if (dot_v3v3(dir1, e->fnext->no) > BEVEL_EPSILON)
- return FALSE;
+ return NULL;
}
}
return v1;
@@ -2623,7 +2623,7 @@ static void bevel_build_trifan(BMesh *bm, BevVert *bv)
BMLoop *l_new;
BMFace *f_new;
BLI_assert(v_fan == l_fan->v);
- f_new = BM_face_split(bm, f, l_fan, l_fan->next->next, &l_new, NULL, FALSE);
+ f_new = BM_face_split(bm, f, l_fan, l_fan->next->next, &l_new, NULL, false);
if (f_new->len > f->len) {
f = f_new;
@@ -2668,7 +2668,7 @@ static void bevel_build_quadstrip(BMesh *bm, BevVert *bv)
l_b = l_b->next;
}
else {
- BM_face_split(bm, f, l_a, l_b, &l_new, NULL, FALSE);
+ BM_face_split(bm, f, l_a, l_b, &l_new, NULL, false);
f = l_new->f;
/* walk around the new face to get the next verts to split */
@@ -2918,11 +2918,11 @@ static BevVert *bevel_vert_construct(BMesh *bm, BevelParams *bp, BMVert *v)
bme = e->e;
BM_BEVEL_EDGE_TAG_ENABLE(bme);
if (BM_elem_flag_test(bme, BM_ELEM_TAG) && !bp->vertex_only) {
- e->is_bev = TRUE;
+ e->is_bev = true;
e->seg = bp->seg;
}
else {
- e->is_bev = FALSE;
+ e->is_bev = false;
e->seg = 0;
}
e->is_rev = (bme->v2 == v);
@@ -3083,7 +3083,7 @@ static bool bev_rebuild_polygon(BMesh *bm, BevelParams *bp, BMFace *f)
BLI_array_append(vv, v->nv.v);
}
- do_rebuild = TRUE;
+ do_rebuild = true;
}
else {
BLI_array_append(vv, l->v);