Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Want <cwant@ualberta.ca>2006-01-03 20:22:42 +0300
committerChris Want <cwant@ualberta.ca>2006-01-03 20:22:42 +0300
commitb41a4764011e875c15e853f3a464bd9d3db3248d (patch)
treeee94a0751882cde2cb73e7ddea8d06c338ac8644 /source/blender/blenlib/BLI_editVert.h
parentaf7e7ab58799b9db774dfcda01776616de408cb8 (diff)
As positively recieved on the mailing list and irc (and blessed by
guitargeek), this commit enhances the support for temporary storage for the structs EditVert, EditEdge, and EditFace. The field "EditVert *vn" has been removed and replaced by a union called "tmp" that can hold: v, an EditVert pointer; e, an EditEdge pointer; f, an EditFace pointer; fp, a float pointer; p, a void pointer; l, a long; Please see the mailing list post here for more information about this: http://projects.blender.org/pipermail/bf-committers/2005-December/012877.html
Diffstat (limited to 'source/blender/blenlib/BLI_editVert.h')
-rw-r--r--source/blender/blenlib/BLI_editVert.h36
1 files changed, 33 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_editVert.h b/source/blender/blenlib/BLI_editVert.h
index a11e1ebfeff..315498bab4c 100644
--- a/source/blender/blenlib/BLI_editVert.h
+++ b/source/blender/blenlib/BLI_editVert.h
@@ -43,7 +43,18 @@ struct DerivedMesh;
/* note; changing this also might affect the undo copy in editmesh.c */
typedef struct EditVert
{
- struct EditVert *next, *prev, *vn;
+ struct EditVert *next, *prev;
+ union {
+ /* some lean storage for temporary usage
+ * in editmesh routines
+ */
+ struct EditVert *v;
+ struct EditEdge *e;
+ struct EditFace *f;
+ float *fp;
+ void *p;
+ long l;
+ } tmp;
float no[3];
float co[3];
short xs, ys;
@@ -66,8 +77,17 @@ typedef struct HashEdge {
typedef struct EditEdge
{
struct EditEdge *next, *prev;
- /* Note: vn is for general purpose temporary storage */
- struct EditVert *v1, *v2, *vn;
+ struct EditVert *v1, *v2;
+ union {
+ /* some lean storage for temporary usage
+ * in editmesh routines
+ */
+ struct EditVert *v;
+ struct EditEdge *e;
+ struct EditFace *f;
+ void *p;
+ long l;
+ } tmp;
short f1, f2; /* short, f1 is (ab)used in subdiv */
unsigned char f, h, dir, seam;
float crease;
@@ -82,6 +102,16 @@ typedef struct EditFace
struct EditFace *next, *prev;
struct EditVert *v1, *v2, *v3, *v4;
struct EditEdge *e1, *e2, *e3, *e4;
+ union {
+ /* some lean storage for temporary usage
+ * in editmesh routines
+ */
+ struct EditVert *v;
+ struct EditEdge *e;
+ struct EditFace *f;
+ void *p;
+ long l;
+ } tmp;
float n[3], cent[3];
struct TFace tf; /* a copy of original tface. */
unsigned char mat_nr, flag;