Blender V2.61 - r43446

bmesh_private.h

Go to the documentation of this file.
00001 /*
00002  * BME_private.h    jan 2007
00003  *
00004  *  low level, 'private' function prototypes for bmesh kernel.
00005  *
00006  *
00007  * ***** BEGIN GPL LICENSE BLOCK *****
00008  *
00009  * This program is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU General Public License
00011  * as published by the Free Software Foundation; either version 2
00012  * of the License, or (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software Foundation,
00021  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00022  *
00023  * The Original Code is Copyright (C) 2004 Blender Foundation.
00024  * All rights reserved.
00025  *
00026  * The Original Code is: all of this file.
00027  *
00028  * Contributor(s): Geoffrey Bantle.
00029  *
00030  * ***** END GPL LICENSE BLOCK *****
00031  */
00032 
00038 #ifndef BMESH_PRIVATE
00039 #define BMESH_PRIVATE
00040 
00041 #include "BKE_bmesh.h"
00042 
00043 /*ALLOCATION/DEALLOCATION*/
00044 struct BME_Vert *BME_addvertlist(struct BME_Mesh *bm, struct BME_Vert *example);
00045 struct BME_Edge *BME_addedgelist(struct BME_Mesh *bm, struct BME_Vert *v1, struct BME_Vert *v2, struct BME_Edge *example);
00046 struct BME_Poly *BME_addpolylist(struct BME_Mesh *bm, struct BME_Poly *example); 
00047 struct BME_Loop *BME_create_loop(struct BME_Mesh *bm, struct BME_Vert *v, struct BME_Edge *e, struct BME_Poly *f, struct BME_Loop *example);
00048 
00049 void BME_free_vert(struct BME_Mesh *bm, struct BME_Vert *v);
00050 void BME_free_edge(struct BME_Mesh *bm, struct BME_Edge *e);
00051 void BME_free_poly(struct BME_Mesh *bm, struct BME_Poly *f);
00052 void BME_free_loop(struct BME_Mesh *bm, struct BME_Loop *l);
00053 
00054 /*DOUBLE CIRCULAR LINKED LIST FUNCTIONS*/
00055 void BME_cycle_append(void *h, void *nt);
00056 int BME_cycle_remove(void *h, void *remn);
00057 int BME_cycle_validate(int len, void *h);
00058 /*DISK CYCLE MANAGMENT*/
00059 int BME_disk_append_edge(struct BME_Edge *e, struct BME_Vert *v);
00060 void BME_disk_remove_edge(struct BME_Edge *e, struct BME_Vert *v);
00061 /*RADIAL CYCLE MANAGMENT*/
00062 void BME_radial_append(struct BME_Edge *e, struct BME_Loop *l);
00063 void BME_radial_remove_loop(struct BME_Loop *l, struct BME_Edge *e);
00064 
00065 /*MISC FUNCTIONS*/
00066 int BME_edge_swapverts(struct BME_Edge *e, struct BME_Vert *orig, struct BME_Vert *new); /*relink edge*/
00067 int BME_disk_hasedge(struct BME_Vert *v, struct BME_Edge *e);
00068 
00069 /*Error reporting. Shouldnt be called by tools ever.*/
00070 void BME_error(void);
00071 #endif