[Bf-blender-cvs] [85cdc02] temp-mball-refactor: cleanup: use 'const' metaelems

Campbell Barton noreply at git.blender.org
Fri Feb 27 16:54:33 CET 2015


Commit: 85cdc0271730ffd92b4b0139a670d61c469651c7
Author: Campbell Barton
Date:   Sat Feb 28 02:54:12 2015 +1100
Branches: temp-mball-refactor
https://developer.blender.org/rB85cdc0271730ffd92b4b0139a670d61c469651c7

cleanup: use 'const' metaelems

===================================================================

M	source/blender/blenkernel/intern/mball_tessellate.c

===================================================================

diff --git a/source/blender/blenkernel/intern/mball_tessellate.c b/source/blender/blenkernel/intern/mball_tessellate.c
index 4d893e4..72adc82 100644
--- a/source/blender/blenkernel/intern/mball_tessellate.c
+++ b/source/blender/blenkernel/intern/mball_tessellate.c
@@ -96,7 +96,7 @@ typedef struct intlists {       /* list of list of integers */
 
 typedef struct Box {			/* an AABB with pointer to metalelem */
 	float min[3], max[3];
-	MetaElem *ml;
+	const MetaElem *ml;
 } Box;
 
 typedef struct MetaballBVHNode {	/* BVH node */
@@ -154,7 +154,7 @@ static void make_union(const BoundBox *a, const Box *b, Box *r_out)
 	r_out->max[2] = max_ff(a->vec[6][2], b->max[2]);
 }
 
-static void make_box_from_ml(Box *r, MetaElem *ml)
+static void make_box_from_ml(Box *r, const MetaElem *ml)
 {
 	copy_v3_v3(r->max, ml->bb->vec[6]);
 	copy_v3_v3(r->min, ml->bb->vec[0]);
@@ -296,7 +296,7 @@ static void build_bvh_spatial(
  * R = metaball radius
  * s - metaball stiffness
  */
-static float densfunc(MetaElem *ball, float x, float y, float z)
+static float densfunc(const MetaElem *ball, float x, float y, float z)
 {
 	float dist2;
 	float dvec[3] = {x, y, z};
@@ -1003,7 +1003,7 @@ static void closest_latice(int r[3], const float pos[3], const float size)
  */
 static void find_first_points(PROCESS *process, const unsigned int em)
 {
-	MetaElem *ml;
+	const MetaElem *ml;
 	int center[3], lbn[3], rtf[3], it[3], dir;
 	float tmp[3], a, b;
 
@@ -1070,7 +1070,7 @@ static void init_meta(EvaluationContext *eval_ctx, PROCESS *process, Scene *scen
 	Base *base;
 	Object *bob;
 	MetaBall *mb;
-	MetaElem *ml;
+	const MetaElem *ml;
 	float obinv[4][4], obmat[4][4];
 	unsigned int i;
 	int obnr, zero_size = 0;




More information about the Bf-blender-cvs mailing list