[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43612] branches/bmesh/blender/source/ blender/bmesh: minor header tidy up
Campbell Barton
ideasman42 at gmail.com
Sun Jan 22 19:44:57 CET 2012
Revision: 43612
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43612
Author: campbellbarton
Date: 2012-01-22 18:44:44 +0000 (Sun, 22 Jan 2012)
Log Message:
-----------
minor header tidy up
Modified Paths:
--------------
branches/bmesh/blender/source/blender/bmesh/bmesh.h
branches/bmesh/blender/source/blender/bmesh/bmesh_class.h
branches/bmesh/blender/source/blender/bmesh/bmesh_iterators.h
branches/bmesh/blender/source/blender/bmesh/bmesh_marking.h
branches/bmesh/blender/source/blender/bmesh/bmesh_operator_api.h
branches/bmesh/blender/source/blender/bmesh/intern/bmesh_private.h
Modified: branches/bmesh/blender/source/blender/bmesh/bmesh.h
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/bmesh.h 2012-01-22 18:04:35 UTC (rev 43611)
+++ branches/bmesh/blender/source/blender/bmesh/bmesh.h 2012-01-22 18:44:44 UTC (rev 43612)
@@ -36,30 +36,30 @@
#include "BKE_customdata.h"
#include "BLI_utildefines.h"
-
+
/*
-short introduction:
+ * short introduction:
+ *
+ * the bmesh structure is a boundary representation, supporting non-manifold
+ * locally modifiable topology. the API is designed to allow clean, maintainable
+ * code, that never (or almost never) directly inspects the underlying structure.
+ *
+ * The API includes iterators, including many useful topological iterators;
+ * walkers, which walk over a mesh, without the risk of hitting the recursion
+ * limit; operators, which are logical, reusable mesh modules; topological
+ * modification functions (like split face, join faces, etc), which are used for
+ * topological manipulations; and some (not yet finished) geometric utility
+ * functions.
+ *
+ * some definitions:
+ *
+ * tool flags: private flags for tools. each operator has it's own private
+ * tool flag "layer", which it can use to flag elements.
+ * tool flags are also used by various other parts of the api.
+ * header flags: stores persistent flags, such as selection state, hide state,
+ * etc. be careful of touching these.
+ */
-the bmesh structure is a boundary representation, supporting non-manifold
-locally modifiable topology. the API is designed to allow clean, maintainable
-code, that never (or almost never) directly inspects the underlying structure.
-
-The API includes iterators, including many useful topological iterators;
-walkers, which walk over a mesh, without the risk of hitting the recursion
-limit; operators, which are logical, reusable mesh modules; topological
-modification functions (like split face, join faces, etc), which are used for
-topological manipulations; and some (not yet finished) geometric utility
-functions.
-
-some definitions:
-
-tool flags: private flags for tools. each operator has it's own private
- tool flag "layer", which it can use to flag elements.
- tool flags are also used by various other parts of the api.
-header flags: stores persistent flags, such as selection state, hide state,
- etc. be careful of touching these.
-*/
-
/*forward declarations*/
struct BMesh;
struct BMVert;
Modified: branches/bmesh/blender/source/blender/bmesh/bmesh_class.h
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/bmesh_class.h 2012-01-22 18:04:35 UTC (rev 43611)
+++ branches/bmesh/blender/source/blender/bmesh/bmesh_class.h 2012-01-22 18:44:44 UTC (rev 43612)
@@ -1,6 +1,4 @@
/*
- * BMesh API.
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
Modified: branches/bmesh/blender/source/blender/bmesh/bmesh_iterators.h
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/bmesh_iterators.h 2012-01-22 18:04:35 UTC (rev 43611)
+++ branches/bmesh/blender/source/blender/bmesh/bmesh_iterators.h 2012-01-22 18:44:44 UTC (rev 43612)
@@ -15,15 +15,15 @@
#include "BLI_mempool.h"
-/*Defines for passing to BMIter_New.
-
- "OF" can be substituted for "around"
- so BM_VERTS_OF_FACE means "vertices
- around a face."
+/* Defines for passing to BMIter_New.
+ *
+ * "OF" can be substituted for "around"
+ * so BM_VERTS_OF_FACE means "vertices
+ * around a face."
*/
-/*these iterator over all elements of a specific
- type in the mesh.*/
+/* these iterator over all elements of a specific
+ * type in the mesh.*/
#define BM_VERTS_OF_MESH 1
#define BM_EDGES_OF_MESH 2
#define BM_FACES_OF_MESH 3
@@ -36,14 +36,14 @@
#define BM_VERTS_OF_FACE 8
#define BM_EDGES_OF_FACE 9
#define BM_LOOPS_OF_FACE 10
-/*returns elements from all boundaries, and returns
-the first element at the end to flag that we're entering
-a different face hole boundary*/
+/* returns elements from all boundaries, and returns
+ * the first element at the end to flag that we're entering
+ * a different face hole boundary*/
#define BM_ALL_LOOPS_OF_FACE 11
-/*iterate through loops around this loop, which are fetched
- from the other faces in the radial cycle surrounding the
- input loop's edge.*/
+/* iterate through loops around this loop, which are fetched
+ * from the other faces in the radial cycle surrounding the
+ * input loop's edge.*/
#define BM_LOOPS_OF_LOOP 12
#define BM_LOOPS_OF_EDGE 13
Modified: branches/bmesh/blender/source/blender/bmesh/bmesh_marking.h
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/bmesh_marking.h 2012-01-22 18:04:35 UTC (rev 43611)
+++ branches/bmesh/blender/source/blender/bmesh/bmesh_marking.h 2012-01-22 18:44:44 UTC (rev 43612)
@@ -14,33 +14,33 @@
void BM_Pin_Edge(BMesh *bm, BMEdge *e, int pin);
void BM_Pin_Face(BMesh *bm, BMFace *f, int pin);
-/*geometry hiding code*/
+/* geometry hiding code */
void BM_Hide(BMesh *bm, void *element, int hide);
void BM_Hide_Vert(BMesh *bm, BMVert *v, int hide);
void BM_Hide_Edge(BMesh *bm, BMEdge *e, int hide);
void BM_Hide_Face(BMesh *bm, BMFace *f, int hide);
-/*Selection code*/
+/* Selection code */
void BM_Select(struct BMesh *bm, void *element, int select);
-/*I don't use this function anywhere, been using BM_TestHFlag instead.
- Need to decide either to keep it and convert everything over, or
- chuck it.*/
+/* I don't use this function anywhere, been using BM_TestHFlag instead.
+ * Need to decide either to keep it and convert everything over, or
+ * chuck it.*/
int BM_Selected(BMesh *bm, const void *element);
void BM_clear_flag_all(BMesh *bm, const char hflag);
-/*individual element select functions, BM_Select is a shortcut for these
- that automatically detects which one to use*/
+/* individual element select functions, BM_Select is a shortcut for these
+ * that automatically detects which one to use*/
void BM_Select_Vert(struct BMesh *bm, struct BMVert *v, int select);
void BM_Select_Edge(struct BMesh *bm, struct BMEdge *e, int select);
void BM_Select_Face(struct BMesh *bm, struct BMFace *f, int select);
void BM_Selectmode_Set(struct BMesh *bm, int selectmode);
-/*counts number of elements with flag set*/
+/* counts number of elements with flag set */
int BM_CountFlag(struct BMesh *bm, const char htype, const char hflag, int respecthide);
-/*edit selection stuff*/
+/* edit selection stuff */
void BM_set_actFace(BMesh *em, BMFace *f);
BMFace *BM_get_actFace(BMesh *bm, int sloppy);
void BM_editselection_center(BMesh *bm, float r_center[3], BMEditSelection *ese);
Modified: branches/bmesh/blender/source/blender/bmesh/bmesh_operator_api.h
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/bmesh_operator_api.h 2012-01-22 18:04:35 UTC (rev 43611)
+++ branches/bmesh/blender/source/blender/bmesh/bmesh_operator_api.h 2012-01-22 18:44:44 UTC (rev 43612)
@@ -14,43 +14,43 @@
#include <string.h> /* for memcpy */
/*
-operators represent logical, executable mesh modules. all topological
-operations involving a bmesh has to go through them.
+ * operators represent logical, executable mesh modules. all topological
+ * operations involving a bmesh has to go through them.
+ *
+ * operators are nested, as are tool flags, which are private to an operator
+ * when it's executed. tool flags are allocated in layers, one per operator
+ * execution, and are used for all internal flagging a tool needs to do.
+ *
+ * each operator has a series of "slots," which can be of the following types:
+ * - simple numerical types
+ * - arrays of elements (e.g. arrays of faces).
+ * - hash mappings.
+ *
+ * each slot is identified by a slot code, as are each operator.
+ * operators, and their slots, are defined in bmesh_opdefines.c (with their
+ * execution functions prototyped in bmesh_operators_private.h), with all their
+ * operator code and slot codes defined in bmesh_operators.h. see
+ * bmesh_opdefines.c and the BMOpDefine struct for how to define new operators.
+ *
+ * in general, operators are fed arrays of elements, created using either
+ * BM_HeaderFlag_To_Slot or BM_Flag_To_Slot (or through one of the format
+ * specifyers in BMO_CallOpf or BMO_InitOpf). Note that multiple element
+ * types (e.g. faces and edges) can be fed to the same slot array. Operators
+ * act on this data, and possibly spit out data into output slots.
+ *
+ * some notes:
+ * - operators should never read from header flags (e.g. element->head.flag). for
+ * example, if you want an operator to only operate on selected faces, you
+ * should use BM_HeaderFlag_To_Slot to put the selected elements into a slot.
+ * - when you read from an element slot array or mapping, you can either tool-flag
+ * all the elements in it, or read them using an iterator APi (which is
+ * semantically similar to the iterator api in bmesh_iterators.h).
+ */
-operators are nested, as are tool flags, which are private to an operator
-when it's executed. tool flags are allocated in layers, one per operator
-execution, and are used for all internal flagging a tool needs to do.
-
-each operator has a series of "slots," which can be of the following types:
-* simple numerical types
-* arrays of elements (e.g. arrays of faces).
-* hash mappings.
-
-each slot is identified by a slot code, as are each operator.
-operators, and their slots, are defined in bmesh_opdefines.c (with their
-execution functions prototyped in bmesh_operators_private.h), with all their
-operator code and slot codes defined in bmesh_operators.h. see
-bmesh_opdefines.c and the BMOpDefine struct for how to define new operators.
-
-in general, operators are fed arrays of elements, created using either
-BM_HeaderFlag_To_Slot or BM_Flag_To_Slot (or through one of the format
-specifyers in BMO_CallOpf or BMO_InitOpf). Note that multiple element
-types (e.g. faces and edges) can be fed to the same slot array. Operators
-act on this data, and possibly spit out data into output slots.
-
-some notes:
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list