2
* ***** BEGIN GPL LICENSE BLOCK *****
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software Foundation,
16
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
* The Original Code is Copyright (C) 2004 Blender Foundation.
19
* All rights reserved.
21
* The Original Code is: all of this file.
23
* Contributor(s): Geoffrey Bantle.
25
* ***** END GPL LICENSE BLOCK *****
28
#ifndef __BMESH_PRIVATE_H__
29
#define __BMESH_PRIVATE_H__
31
/** \file blender/bmesh/intern/bmesh_private.h
34
* Private function prototypes for bmesh public API.
35
* This file is a grab-bag of functions from various
36
* parts of the bmesh internals.
39
/* returns positive nonzero on error */
40
int bmesh_elem_check(void *element, const char htype);
42
#define BM_CHECK_ELEMENT(el) \
43
if (bmesh_elem_check(el, ((BMHeader *)el)->htype)) { \
44
printf("check_element failure, with code %i on line %i in file\n" \
46
bmesh_elem_check(el, ((BMHeader *)el)->htype), \
47
__LINE__, __FILE__); \
50
#define BM_DISK_EDGE_LINK_GET(e, v) ( \
51
((v) == ((BMEdge *)(e))->v1) ? \
52
&((e)->v1_disk_link) : \
53
&((e)->v2_disk_link) \
56
int bmesh_radial_length(BMLoop *l);
57
int bmesh_disk_count(BMVert *v);
59
/* NOTE: ensure different parts of the API do not conflict
60
* on using these internal flags!*/
61
#define _FLAG_JF 1 /* join faces */
62
#define _FLAG_MF 2 /* make face */
63
#define _FLAG_MV 2 /* make face, vertex */
65
#define BM_ELEM_API_FLAG_ENABLE(element, f) ((element)->oflags[0].pflag |= (f))
66
#define BM_ELEM_API_FLAG_DISABLE(element, f) ((element)->oflags[0].pflag &= ~(f))
67
#define BM_ELEM_API_FLAG_TEST(element, f) ((element)->oflags[0].pflag & (f))
69
void calc_poly_plane(float (*verts)[3], const int nverts);
70
void poly_rotate_plane(const float normal[3], float (*verts)[3], const int nverts);
72
/* include the rest of our private declarations */
73
#include "bmesh_structure.h"
74
#include "bmesh_operators_private.h"
76
#endif /* __BMESH_PRIVATE_H__ */