bmesh: re-arrange headers

This commit is contained in:
Campbell Barton
2012-02-28 16:47:12 +00:00
parent 22abc63f67
commit df0f0c63d3
12 changed files with 98 additions and 25 deletions

View File

@@ -81,24 +81,30 @@ set(SRC
operators/bmo_utils.c
intern/bmesh_construct.c
intern/bmesh_core.c
intern/bmesh_inline.c
intern/bmesh_interp.c
intern/bmesh_interp.h
intern/bmesh_iterators.c
intern/bmesh_iterators.h
intern/bmesh_iterators_inline.c
intern/bmesh_marking.c
intern/bmesh_marking.h
intern/bmesh_mesh.c
intern/bmesh_mods.c
intern/bmesh_core.c
intern/bmesh_opdefines.c
intern/bmesh_operator_api_inline.c
intern/bmesh_operators.c
intern/bmesh_operators.h
intern/bmesh_operators_private.h
intern/bmesh_polygon.c
intern/bmesh_private.h
intern/bmesh_queries.c
intern/bmesh_queries.h
intern/bmesh_structure.c
intern/bmesh_structure.h
intern/bmesh_walkers.c
intern/bmesh_walkers.h
intern/bmesh_walkers_impl.c
intern/bmesh_walkers_private.h
@@ -107,13 +113,7 @@ set(SRC
bmesh.h
bmesh_class.h
bmesh_error.h
bmesh_interp.h
bmesh_iterators.h
bmesh_marking.h
bmesh_operator_api.h
bmesh_operators.h
bmesh_queries.h
bmesh_walkers.h
)
add_definitions(-DGLEW_STATIC)

View File

@@ -460,14 +460,17 @@ void bmesh_edit_end(BMesh *bm, int flag);
#define BM_NGON_MAX 100000
/* include the rest of the API */
#include "bmesh_marking.h"
#include "bmesh_operator_api.h"
#include "bmesh_operators.h"
#include "bmesh_error.h"
#include "bmesh_queries.h"
#include "bmesh_interp.h"
#include "bmesh_iterators.h"
#include "bmesh_walkers.h"
#include "intern/bmesh_interp.h"
#include "intern/bmesh_iterators.h"
#include "intern/bmesh_marking.h"
#include "intern/bmesh_operators.h"
#include "intern/bmesh_queries.h"
#include "intern/bmesh_walkers.h"
#include "intern/bmesh_walkers.h"
#include "intern/bmesh_inline.c"
#include "intern/bmesh_operator_api_inline.c"

View File

@@ -113,7 +113,7 @@ enum {
/* please ignore all these structures, don't touch them in tool code, except
* for when your defining an operator with BMOpDefine.*/
typedef struct BMOpSlot{
typedef struct BMOpSlot {
int slottype;
int len;
int flag;

View File

@@ -0,0 +1,70 @@
/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Geoffrey Bantle, Levi Schooley.
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef __BMESH_INTERP_H__
#define __BMESH_INTERP_H__
/** \file blender/bmesh/intern/bmesh_interp.h
* \ingroup bmesh
*/
#ifdef __cplusplus
extern "C" {
#endif
/* project the multires grid in target onto source's set of multires grids */
void BM_loop_interp_multires(BMesh *bm, BMLoop *target, BMFace *source);
void BM_vert_interp_from_face(BMesh *bm, BMVert *v, BMFace *source);
void BM_data_interp_from_verts(BMesh *bm, BMVert *v1, BMVert *v2, BMVert *v, const float fac);
void BM_data_interp_face_vert_edge(BMesh *bm, BMVert *v1, BMVert *v2, BMVert *v, BMEdge *e1, const float fac);
void BM_data_layer_add(BMesh *em, CustomData *data, int type);
void BM_data_layer_add_named(BMesh *bm, CustomData *data, int type, const char *name);
void BM_data_layer_free(BMesh *em, CustomData *data, int type);
void BM_data_layer_free_n(BMesh *bm, CustomData *data, int type, int n);
float BM_elem_float_data_get(CustomData *cd, void *element, int type);
void BM_elem_float_data_set(CustomData *cd, void *element, int type, const float val);
/**
* projects target onto source for customdata interpolation.
* \note only does loop customdata. multires is handled. */
void BM_face_interp_from_face(BMesh *bm, BMFace *target, BMFace *source);
/* projects a single loop, target, onto source for customdata interpolation. multires is handled.
* if do_vertex is true, target's vert data will also get interpolated.*/
void BM_loop_interp_from_face(BMesh *bm, BMLoop *target, BMFace *source,
int do_vertex, int do_multires);
/* smoothes boundaries between multires grids, including some borders in adjacent faces */
void BM_face_multires_bounds_smooth(BMesh *bm, BMFace *f);
/* convert MLoop*** in a bmface to mtface and mcol in
* an MFace*/
void BM_loops_to_corners(BMesh *bm, struct Mesh *me, int findex,
BMFace *f, int numTex, int numCol);
#ifdef __cplusplus
}
#endif
#endif /* __BMESH_INTERP_H__ */

View File

@@ -23,7 +23,7 @@
#ifndef __BMESH_ITERATORS_H__
#define __BMESH_ITERATORS_H__
/** \file blender/bmesh/bmesh_iterators.h
/** \file blender/bmesh/intern/bmesh_iterators.h
* \ingroup bmesh
*/

View File

@@ -23,7 +23,7 @@
#ifndef __BMESH_MARKING_H__
#define __BMESH_MARKING_H__
/** \file blender/bmesh/bmesh_marking.h
/** \file blender/bmesh/intern/bmesh_marking.h
* \ingroup bmesh
*/

View File

@@ -23,7 +23,7 @@
#ifndef __BMESH_OPERATORS_H__
#define __BMESH_OPERATORS_H__
/** \file blender/bmesh/bmesh_operators.h
/** \file blender/bmesh/intern/bmesh_operators.h
* \ingroup bmesh
*/

View File

@@ -23,7 +23,7 @@
#ifndef __BMESH_WALKERS_H__
#define __BMESH_WALKERS_H__
/** \file blender/bmesh/bmesh_walkers.h
/** \file blender/bmesh/intern/bmesh_walkers.h
* \ingroup bmesh
*/

View File

@@ -34,13 +34,13 @@ extern int bm_totwalkers;
/* Pointer hiding*/
typedef struct bmesh_walkerGeneric{
typedef struct bmesh_walkerGeneric {
Link link;
int depth;
} bmesh_walkerGeneric;
typedef struct shellWalker{
typedef struct shellWalker {
bmesh_walkerGeneric header;
BMEdge *curedge;
} shellWalker;

View File

@@ -943,14 +943,14 @@ static int loop_multiselect(bContext *C, wmOperator *op)
if (looptype) {
for (edindex = 0; edindex < totedgesel; edindex += 1) {
eed = edarray[edindex];
walker_select(em, BMW_EDGERING, eed, 1);
walker_select(em, BMW_EDGERING, eed, TRUE);
}
EDBM_selectmode_flush(em);
}
else{
else {
for (edindex = 0; edindex < totedgesel; edindex += 1) {
eed = edarray[edindex];
walker_select(em, BMW_LOOP, eed, 1);
walker_select(em, BMW_LOOP, eed, TRUE);
}
EDBM_selectmode_flush(em);
}

View File

@@ -2013,7 +2013,7 @@ static int merge_firstlast(BMEditMesh *em, int first, int uvmerge, wmOperator *w
ese = em->bm->selected.last;
mergevert = (BMVert *)ese->ele;
}
else{
else {
ese = em->bm->selected.first;
mergevert = (BMVert *)ese->ele;
}
@@ -2997,7 +2997,7 @@ static float bm_edge_seg_isect(BMEdge *e, CutCurve *c, int len, char mode,
m1 = (y12 - y11) / xdiff1;
b1 = ((x12 * y11) - (x11 * y12)) / xdiff1;
}
else{
else {
m1 = MAXSLOPE;
b1 = x12;
}