[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16154] branches/soc-2008-nicholasbishop/ source/blender/blenkernel: The displacer struct is now only used in multires, moved out of the header file and cleaned up.
Nicholas Bishop
nicholasbishop at gmail.com
Sun Aug 17 19:25:21 CEST 2008
Revision: 16154
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16154
Author: nicholasbishop
Date: 2008-08-17 19:25:21 +0200 (Sun, 17 Aug 2008)
Log Message:
-----------
The displacer struct is now only used in multires, moved out of the header file and cleaned up.
Modified Paths:
--------------
branches/soc-2008-nicholasbishop/source/blender/blenkernel/BKE_multires.h
branches/soc-2008-nicholasbishop/source/blender/blenkernel/intern/multires.c
Modified: branches/soc-2008-nicholasbishop/source/blender/blenkernel/BKE_multires.h
===================================================================
--- branches/soc-2008-nicholasbishop/source/blender/blenkernel/BKE_multires.h 2008-08-17 17:22:10 UTC (rev 16153)
+++ branches/soc-2008-nicholasbishop/source/blender/blenkernel/BKE_multires.h 2008-08-17 17:25:21 UTC (rev 16154)
@@ -30,6 +30,7 @@
struct DerivedMesh;
struct Mesh;
struct MFace;
+struct MultiresModifierData;
struct Object;
typedef struct MultiresSubsurf {
@@ -60,32 +61,6 @@
#define MULTIRES_DM_UPDATE_BLOCK 1
#define MULTIRES_DM_UPDATE_ALWAYS 2
-/* Modifier */
-struct MDisps;
-struct MFace;
-struct MultiresModifierData;
-typedef struct MultiresDisplacer {
- struct MDisps *grid;
- struct MFace *face;
- float mat[3][3];
-
- /* For matrix calc */
- float mat_target[3];
- float mat_center[3];
- float (*mat_norms)[3];
-
- int spacing;
- int sidetot;
- int sidendx;
- int type;
- int invert;
- float (*orco)[3];
- struct MVert *subco;
- float weight;
-
- int x, y, ax, ay;
-} MultiresDisplacer;
-
void multires_force_update(struct Object *ob);
struct DerivedMesh *multires_dm_create_from_derived(struct MultiresModifierData*, struct DerivedMesh*,
@@ -99,15 +74,6 @@
void multiresModifier_setLevel(void *mmd_v, void *ob_v);
int multiresModifier_reshape(struct MultiresModifierData *mmd, struct Object *dst, struct Object *src);
-void multires_displacer_init(MultiresDisplacer *d, struct DerivedMesh *dm,
- const int face_index, const int invert);
-void multires_displacer_weight(MultiresDisplacer *d, const float w);
-void multires_displacer_anchor(MultiresDisplacer *d, const int type, const int side_index);
-void multires_displacer_anchor_edge(MultiresDisplacer *d, const int, const int, const int);
-void multires_displacer_anchor_vert(MultiresDisplacer *d, const int);
-void multires_displacer_jump(MultiresDisplacer *d);
-void multires_displace(MultiresDisplacer *d, float out[3]);
-
/* Related to the old multires */
struct Multires;
void multires_load_old(struct DerivedMesh *, struct Multires *);
Modified: branches/soc-2008-nicholasbishop/source/blender/blenkernel/intern/multires.c
===================================================================
--- branches/soc-2008-nicholasbishop/source/blender/blenkernel/intern/multires.c 2008-08-17 17:22:10 UTC (rev 16153)
+++ branches/soc-2008-nicholasbishop/source/blender/blenkernel/intern/multires.c 2008-08-17 17:25:21 UTC (rev 16154)
@@ -56,6 +56,28 @@
#include <math.h>
#include <string.h>
+typedef struct MultiresDisplacer {
+ struct MDisps *grid;
+ struct MFace *face;
+ float mat[3][3];
+
+ /* For matrix calc */
+ float mat_target[3];
+ float mat_center[3];
+ float (*mat_norms)[3];
+
+ int spacing;
+ int sidetot;
+ int sidendx;
+ int type;
+ int invert;
+ float (*orco)[3];
+ struct MVert *subco;
+ float weight;
+
+ int x, y, ax, ay;
+} MultiresDisplacer;
+
/* Does not actually free lvl itself */
void multires_free_level(MultiresLevel *lvl)
{
@@ -873,7 +895,7 @@
}
}
-void multires_displacer_init(MultiresDisplacer *d, DerivedMesh *dm,
+static void multires_displacer_init(MultiresDisplacer *d, DerivedMesh *dm,
const int face_index, const int invert)
{
Mesh *me = MultiresDM_get_mesh(dm);
@@ -898,12 +920,12 @@
d->invert = invert;
}
-void multires_displacer_weight(MultiresDisplacer *d, const float w)
+static void multires_displacer_weight(MultiresDisplacer *d, const float w)
{
d->weight = w;
}
-void multires_displacer_anchor(MultiresDisplacer *d, const int type, const int side_index)
+static void multires_displacer_anchor(MultiresDisplacer *d, const int type, const int side_index)
{
d->sidendx = side_index;
d->x = d->y = d->sidetot / 2;
@@ -942,7 +964,7 @@
d->ay = d->y;
}
-void multires_displacer_anchor_edge(MultiresDisplacer *d, int v1, int v2, int x)
+static void multires_displacer_anchor_edge(MultiresDisplacer *d, int v1, int v2, int x)
{
const int mov = d->spacing * x;
@@ -982,7 +1004,7 @@
}
}
-void multires_displacer_anchor_vert(MultiresDisplacer *d, const int v)
+static void multires_displacer_anchor_vert(MultiresDisplacer *d, const int v)
{
const int e = d->sidetot - 1;
@@ -997,7 +1019,7 @@
d->y = e;
}
-void multires_displacer_jump(MultiresDisplacer *d)
+static void multires_displacer_jump(MultiresDisplacer *d)
{
if(d->sidendx == 0) {
d->x -= d->spacing;
@@ -1017,7 +1039,7 @@
}
}
-void multires_displace(MultiresDisplacer *d, float co[3])
+static void multires_displace(MultiresDisplacer *d, float co[3])
{
float disp[3];
float *data;
More information about the Bf-blender-cvs
mailing list