2012-02-28 18:28:30 +00:00
|
|
|
/*
|
|
|
|
|
* ***** 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): Joseph Eagar.
|
|
|
|
|
*
|
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef __BMESH_CORE_H__
|
|
|
|
|
#define __BMESH_CORE_H__
|
|
|
|
|
|
|
|
|
|
/** \file blender/bmesh/intern/bmesh_core.h
|
|
|
|
|
* \ingroup bmesh
|
|
|
|
|
*/
|
|
|
|
|
|
2015-04-25 20:15:20 +10:00
|
|
|
BMFace *BM_face_copy(
|
|
|
|
|
BMesh *bm_dst, BMesh *bm_src, BMFace *f,
|
|
|
|
|
const bool copy_verts, const bool copy_edges);
|
2012-02-28 18:28:30 +00:00
|
|
|
|
2012-11-29 16:26:39 +00:00
|
|
|
typedef enum eBMCreateFlag {
|
2013-08-21 05:11:11 +00:00
|
|
|
BM_CREATE_NOP = 0,
|
2012-11-29 16:26:39 +00:00
|
|
|
/* faces and edges only */
|
|
|
|
|
BM_CREATE_NO_DOUBLE = (1 << 1),
|
|
|
|
|
/* Skip CustomData - for all element types data,
|
|
|
|
|
* use if we immediately write customdata into the element so this skips copying from 'example'
|
|
|
|
|
* args or setting defaults, speeds up conversion when data is converted all at once. */
|
|
|
|
|
BM_CREATE_SKIP_CD = (1 << 2),
|
|
|
|
|
} eBMCreateFlag;
|
|
|
|
|
|
2015-04-25 20:15:20 +10:00
|
|
|
BMVert *BM_vert_create(
|
|
|
|
|
BMesh *bm, const float co[3],
|
|
|
|
|
const BMVert *v_example, const eBMCreateFlag create_flag);
|
|
|
|
|
BMEdge *BM_edge_create(
|
|
|
|
|
BMesh *bm, BMVert *v1, BMVert *v2,
|
|
|
|
|
const BMEdge *e_example, const eBMCreateFlag create_flag);
|
|
|
|
|
BMFace *BM_face_create(
|
|
|
|
|
BMesh *bm, BMVert **verts, BMEdge **edges, const int len,
|
|
|
|
|
const BMFace *f_example, const eBMCreateFlag create_flag);
|
|
|
|
|
BMFace *BM_face_create_verts(
|
|
|
|
|
BMesh *bm, BMVert **verts, const int len,
|
|
|
|
|
const BMFace *f_example, const eBMCreateFlag create_flag,
|
|
|
|
|
const bool create_edges);
|
2012-02-28 18:28:30 +00:00
|
|
|
|
2012-03-09 00:01:38 +00:00
|
|
|
void BM_face_edges_kill(BMesh *bm, BMFace *f);
|
|
|
|
|
void BM_face_verts_kill(BMesh *bm, BMFace *f);
|
2012-02-28 18:28:30 +00:00
|
|
|
|
2012-03-09 00:01:38 +00:00
|
|
|
void BM_face_kill(BMesh *bm, BMFace *f);
|
|
|
|
|
void BM_edge_kill(BMesh *bm, BMEdge *e);
|
|
|
|
|
void BM_vert_kill(BMesh *bm, BMVert *v);
|
2012-02-28 18:28:30 +00:00
|
|
|
|
2015-04-25 20:15:20 +10:00
|
|
|
void bmesh_edge_separate(
|
|
|
|
|
BMesh *bm, BMEdge *e, BMLoop *l_sep,
|
|
|
|
|
const bool copy_select);
|
2015-05-01 19:30:41 +10:00
|
|
|
bool BM_edge_splice(BMesh *bm, BMEdge *e_dst, BMEdge *e_src);
|
|
|
|
|
bool BM_vert_splice(BMesh *bm, BMVert *v_dst, BMVert *v_src);
|
2014-08-18 15:56:34 +10:00
|
|
|
bool BM_vert_splice_check_double(BMVert *v_a, BMVert *v_b);
|
2012-03-09 03:16:39 +00:00
|
|
|
|
2015-04-25 20:15:20 +10:00
|
|
|
void bmesh_vert_separate(
|
|
|
|
|
BMesh *bm, BMVert *v, BMVert ***r_vout, int *r_vout_len,
|
|
|
|
|
const bool copy_select);
|
2012-03-05 00:50:18 +00:00
|
|
|
|
2013-01-14 16:42:43 +00:00
|
|
|
bool bmesh_loop_reverse(BMesh *bm, BMFace *f);
|
2012-02-28 18:28:30 +00:00
|
|
|
|
2013-01-14 16:42:43 +00:00
|
|
|
BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface, const bool do_del);
|
2015-04-25 20:15:20 +10:00
|
|
|
void BM_vert_separate(
|
2015-05-02 16:04:02 +10:00
|
|
|
BMesh *bm, BMVert *v, BMEdge **e_in, int e_in_len, const bool copy_select,
|
|
|
|
|
BMVert ***r_vout, int *r_vout_len);
|
|
|
|
|
void BM_vert_separate_hflag(
|
|
|
|
|
BMesh *bm, BMVert *v, const char hflag, const bool copy_select,
|
|
|
|
|
BMVert ***r_vout, int *r_vout_len);
|
2012-02-28 18:28:30 +00:00
|
|
|
|
|
|
|
|
/* EULER API - For modifying structure */
|
2015-04-25 20:15:20 +10:00
|
|
|
BMFace *bmesh_sfme(
|
|
|
|
|
BMesh *bm, BMFace *f,
|
|
|
|
|
BMLoop *l1, BMLoop *l2,
|
|
|
|
|
BMLoop **r_l,
|
2012-02-28 18:28:30 +00:00
|
|
|
#ifdef USE_BMESH_HOLES
|
2013-12-24 11:04:03 +11:00
|
|
|
ListBase *holes,
|
2012-02-28 18:28:30 +00:00
|
|
|
#endif
|
2013-12-24 11:04:03 +11:00
|
|
|
BMEdge *example,
|
|
|
|
|
const bool no_double
|
|
|
|
|
);
|
2012-02-28 18:28:30 +00:00
|
|
|
|
|
|
|
|
BMVert *bmesh_semv(BMesh *bm, BMVert *tv, BMEdge *e, BMEdge **r_e);
|
2015-04-25 20:15:20 +10:00
|
|
|
BMEdge *bmesh_jekv(
|
|
|
|
|
BMesh *bm, BMEdge *e_kill, BMVert *v_kill,
|
2015-11-19 15:28:18 +11:00
|
|
|
const bool do_del, const bool check_edge_splice,
|
|
|
|
|
const bool kill_degenerate_faces);
|
2015-11-19 18:12:20 +11:00
|
|
|
BMVert *bmesh_jvke(
|
|
|
|
|
BMesh *bm, BMEdge *e_kill, BMVert *v_kill,
|
|
|
|
|
const bool do_del, const bool check_edge_double,
|
|
|
|
|
const bool kill_degenerate_faces);
|
2012-02-28 18:28:30 +00:00
|
|
|
BMFace *bmesh_jfke(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e);
|
2013-03-09 17:12:24 +00:00
|
|
|
BMVert *bmesh_urmv(BMesh *bm, BMFace *f_sep, BMVert *v_sep);
|
|
|
|
|
BMVert *bmesh_urmv_loop(BMesh *bm, BMLoop *l_sep);
|
2015-04-30 05:52:48 +10:00
|
|
|
BMVert *bmesh_urmv_loop_multi(
|
|
|
|
|
BMesh *bm, BMLoop **larr, int larr_len);
|
2015-05-03 06:15:24 +10:00
|
|
|
BMVert *bmesh_urmv_loop_region(BMesh *bm, BMLoop *l_sep);
|
2012-02-28 18:28:30 +00:00
|
|
|
|
2013-11-27 08:08:00 +11:00
|
|
|
void bmesh_face_swap_data(BMFace *f_a, BMFace *f_b);
|
2013-10-08 19:28:11 +00:00
|
|
|
|
2012-02-28 18:28:30 +00:00
|
|
|
#endif /* __BMESH_CORE_H__ */
|