Purge of compiler warnings... (hopefully everything still compiles, there are still more to remove)
This commit is contained in:
@@ -403,4 +403,4 @@ DerivedMesh *BME_bmesh_to_derivedmesh(BME_Mesh *bm, DerivedMesh *dm)
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,8 +196,8 @@ BME_Poly *BME_MF(BME_Mesh *bm, BME_Vert *v1, BME_Vert *v2, BME_Edge **elist, int
|
||||
{
|
||||
BME_Poly *f = NULL;
|
||||
BME_Edge *curedge;
|
||||
BME_Vert *curvert, *tv, *nextv,**vlist;
|
||||
int i, j, done, cont, edok,vlen;
|
||||
BME_Vert *curvert, *tv, **vlist;
|
||||
int i, j, done, cont, edok;
|
||||
|
||||
if(len < 2) return BME_exit("MF returned NULL");
|
||||
|
||||
@@ -428,7 +428,7 @@ BME_Vert *BME_SEMV(BME_Mesh *bm, BME_Vert *tv, BME_Edge *e, BME_Edge **re){
|
||||
BME_Vert *nv, *ov;
|
||||
BME_CycleNode *diskbase;
|
||||
BME_Edge *ne;
|
||||
int i, radlen, edok, valance1=0, valance2=0;
|
||||
int i, edok, valance1=0, valance2=0;
|
||||
|
||||
if(BME_vert_in_edge(e,tv) == 0) return BME_exit("SEMV returned NULL");
|
||||
ov = BME_edge_getothervert(e,tv);
|
||||
@@ -879,7 +879,7 @@ BME_Poly *BME_JFKE(BME_Mesh *bm, BME_Poly *f1, BME_Poly *f2, BME_Edge *e)
|
||||
{
|
||||
|
||||
BME_Loop *curloop, *f1loop=NULL, *f2loop=NULL;
|
||||
int loopok = 0, newlen = 0,i, f1len=0, f2len=0, radlen=0, valance1,valance2,edok;
|
||||
int loopok = 0, newlen = 0,i, f1len=0, f2len=0, radlen=0, edok;
|
||||
|
||||
if(f1->holes.first || f2->holes.first) return BME_exit("JFKE returned NULL"); //dont operate on faces with holes. Not best solution but tolerable.
|
||||
if(f1 == f2) return BME_exit("JFKE returned NULL"); //can't join a face to itself
|
||||
|
||||
@@ -83,7 +83,6 @@ void BME_free_mesh(BME_Mesh *bm)
|
||||
BME_Edge *be, *nexte;
|
||||
BME_Vert *bv, *nextv;
|
||||
BME_CycleNode *loopref;
|
||||
int loopcount=0;
|
||||
|
||||
/*destroy polygon data*/
|
||||
bf = bm->polys.first;
|
||||
@@ -145,16 +144,10 @@ void BME_free_mesh(BME_Mesh *bm)
|
||||
* from scratch.
|
||||
*/
|
||||
|
||||
BME_Mesh *BME_copy_mesh(BME_Mesh *bm){
|
||||
|
||||
BME_Vert *v, *cv;
|
||||
BME_Edge *e, *ce;
|
||||
BME_Poly *f, *cf;
|
||||
BME_Loop *l, *cl;
|
||||
BME_Mesh *BME_copy_mesh(BME_Mesh *bm)
|
||||
{
|
||||
BME_Mesh *meshcopy;
|
||||
meshcopy = BME_make_mesh();
|
||||
|
||||
|
||||
return meshcopy;
|
||||
}
|
||||
|
||||
|
||||
@@ -656,7 +656,6 @@ BME_Loop *BME_bevel_edge(BME_Mesh *bm, BME_Loop *l, float value, int options, fl
|
||||
BME_Loop *kl, *nl;
|
||||
BME_Edge *e;
|
||||
BME_Poly *f;
|
||||
float factor=1;
|
||||
|
||||
f = l->f;
|
||||
e = l->e;
|
||||
@@ -869,7 +868,7 @@ void BME_bevel_add_vweight(BME_TransData_Head *td, BME_Mesh *bm, BME_Vert *v, fl
|
||||
|
||||
if (v->tflag1 & BME_BEVEL_NONMAN) return;
|
||||
v->tflag1 |= BME_BEVEL_BEVEL;
|
||||
if (vtd = BME_get_transdata(td, v)) {
|
||||
if ( (vtd = BME_get_transdata(td, v)) ) {
|
||||
if (options & BME_BEVEL_EMIN) {
|
||||
vtd->factor = 1.0;
|
||||
if (vtd->weight < 0 || weight < vtd->weight) {
|
||||
@@ -952,7 +951,7 @@ BME_Mesh *BME_bevel_initialize(BME_Mesh *bm, int options, int defgrp_index, floa
|
||||
BME_TransData *vtd;
|
||||
MDeformVert *dvert;
|
||||
MDeformWeight *dw;
|
||||
int i, len;
|
||||
int len;
|
||||
float weight, threshold;
|
||||
|
||||
/* vert pass */
|
||||
@@ -1151,8 +1150,8 @@ BME_Mesh *BME_bevel_reinitialize(BME_Mesh *bm) {
|
||||
* A BME_Mesh pointer to the BMesh passed as a parameter.
|
||||
*/
|
||||
BME_Mesh *BME_bevel_mesh(BME_Mesh *bm, float value, int res, int options, int defgrp_index, BME_TransData_Head *td) {
|
||||
BME_Vert *v, *nv, *kv;
|
||||
BME_Edge *e, *oe, *ne;
|
||||
BME_Vert *v, *nv;
|
||||
BME_Edge *e, *oe;
|
||||
BME_Loop *l, *l2;
|
||||
BME_Poly *f, *nf;
|
||||
unsigned int i, len, done;
|
||||
@@ -1183,7 +1182,7 @@ BME_Mesh *BME_bevel_mesh(BME_Mesh *bm, float value, int res, int options, int de
|
||||
}
|
||||
/* look for original edges, and remove them */
|
||||
oe = e;
|
||||
while (e = BME_disk_next_edgeflag(oe, v, 0, BME_BEVEL_ORIG | BME_BEVEL_BEVEL)) {
|
||||
while ( (e = BME_disk_next_edgeflag(oe, v, 0, BME_BEVEL_ORIG | BME_BEVEL_BEVEL)) ) {
|
||||
/* join the faces (we'll split them later) */
|
||||
f = BME_JFKE_safe(bm,e->loop->f,((BME_Loop*)e->loop->radial.next->data)->f,e);
|
||||
if (!f) printf("Non-manifold geometry not getting tagged right?\n");
|
||||
@@ -1318,7 +1317,7 @@ BME_Mesh *BME_bevel(BME_Mesh *bm, float value, int res, int options, int defgrp_
|
||||
|
||||
/* transform pass */
|
||||
for (v = bm->verts.first; v; v=v->next) {
|
||||
if (vtd = BME_get_transdata(td, v)) {
|
||||
if ( (vtd = BME_get_transdata(td, v)) ) {
|
||||
if (vtd->max && (*vtd->max > 0 && value > *vtd->max)) {
|
||||
d = *vtd->max;
|
||||
}
|
||||
|
||||
@@ -277,20 +277,16 @@ DerivedMesh *CDDM_create_tearing ( ClothModifierData *clmd, DerivedMesh *dm )
|
||||
DerivedMesh *result = NULL;
|
||||
unsigned int i = 0, a = 0, j=0;
|
||||
int numverts = dm->getNumVerts ( dm );
|
||||
int numedges = dm->getNumEdges ( dm );
|
||||
int numfaces = dm->getNumFaces ( dm );
|
||||
|
||||
MVert *mvert = CDDM_get_verts ( dm );
|
||||
MEdge *medge = CDDM_get_edges ( dm );
|
||||
MFace *mface = CDDM_get_faces ( dm );
|
||||
|
||||
MVert *mvert2;
|
||||
MFace *mface2;
|
||||
unsigned int numtris=0;
|
||||
unsigned int numquads=0;
|
||||
EdgeHash *edgehash = NULL;
|
||||
Cloth *cloth = clmd->clothObject;
|
||||
ClothSpring *springs = cloth->springs;
|
||||
ClothSpring *springs = (ClothSpring *)cloth->springs;
|
||||
unsigned int numsprings = cloth->numsprings;
|
||||
|
||||
// create spring tearing hash
|
||||
|
||||
@@ -443,7 +443,6 @@ DO_INLINE void interpolateOnTriangle(float to[3], float v1[3], float v2[3], floa
|
||||
|
||||
int cloth_collision_response_static(ClothModifierData *clmd, CollisionModifierData *collmd)
|
||||
{
|
||||
unsigned int i = 0;
|
||||
int result = 0;
|
||||
LinkNode *search = NULL;
|
||||
CollPair *collpair = NULL;
|
||||
@@ -493,10 +492,8 @@ int cloth_collision_response_static(ClothModifierData *clmd, CollisionModifierDa
|
||||
if(magrelVel < -ALMOST_ZERO)
|
||||
{
|
||||
// Calculate Impulse magnitude to stop all motion in normal direction.
|
||||
float magnitude_i = magrelVel / 2.0; // TODO implement masses
|
||||
float tangential[3], magtangent, magnormal;
|
||||
float tangential[3], magtangent;
|
||||
double impulse = 0.0;
|
||||
float epsilon = clmd->coll_parms->epsilon;
|
||||
float vrel_t_pre[3];
|
||||
float vrel_t[3], temp[3];
|
||||
|
||||
@@ -716,8 +713,6 @@ void cloth_collision_moving_edges(ClothModifierData *clmd, ClothModifierData *co
|
||||
Cloth *cloth1=NULL, *cloth2=NULL;
|
||||
MFace *face1=NULL, *face2=NULL;
|
||||
ClothVertex *verts1=NULL, *verts2=NULL;
|
||||
double distance = 0;
|
||||
float epsilon = clmd->coll_parms->epsilon;
|
||||
unsigned int i = 0, j = 0, k = 0;
|
||||
int numsolutions = 0;
|
||||
float a[3], b[3], c[3], d[3], e[3], f[3], solution[3];
|
||||
@@ -831,7 +826,7 @@ void cloth_collision_moving_edges(ClothModifierData *clmd, ClothModifierData *co
|
||||
{
|
||||
if ((solution[k] >= 0.0) && (solution[k] <= 1.0))
|
||||
{
|
||||
float out_collisionTime = solution[k];
|
||||
//float out_collisionTime = solution[k];
|
||||
|
||||
// TODO: check for collisions
|
||||
|
||||
@@ -851,8 +846,6 @@ void cloth_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *col
|
||||
Cloth *cloth1=NULL, *cloth2=NULL;
|
||||
MFace *face1=NULL, *face2=NULL;
|
||||
ClothVertex *verts1=NULL, *verts2=NULL;
|
||||
double distance = 0;
|
||||
float epsilon = clmd->coll_parms->epsilon;
|
||||
unsigned int i = 0, j = 0, k = 0;
|
||||
int numsolutions = 0;
|
||||
float a[3], b[3], c[3], d[3], e[3], f[3], solution[3];
|
||||
@@ -921,7 +914,7 @@ void cloth_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *col
|
||||
{
|
||||
if ((solution[k] >= 0.0) && (solution[k] <= 1.0))
|
||||
{
|
||||
float out_collisionTime = solution[k];
|
||||
//float out_collisionTime = solution[k];
|
||||
|
||||
// TODO: check for collisions
|
||||
|
||||
@@ -950,6 +943,7 @@ void cloth_collision_moving(ClothModifierData *clmd, ClothModifierData *coll_clm
|
||||
|
||||
void cloth_collision_self_static(ModifierData *md1, ModifierData *md2, CollisionTree *tree1, CollisionTree *tree2)
|
||||
{
|
||||
/*
|
||||
ClothModifierData *clmd = (ClothModifierData *)md1;
|
||||
CollisionModifierData *collmd = (CollisionModifierData *)md2;
|
||||
CollPair *collpair = NULL;
|
||||
@@ -959,10 +953,11 @@ void cloth_collision_self_static(ModifierData *md1, ModifierData *md2, Collision
|
||||
double distance = 0;
|
||||
float epsilon = clmd->coll_parms->epsilon;
|
||||
unsigned int i = 0;
|
||||
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* aye this belongs to arith.c */
|
||||
static void Vec3PlusStVec(float *v, float s, float *v1)
|
||||
{
|
||||
@@ -970,6 +965,7 @@ static void Vec3PlusStVec(float *v, float s, float *v1)
|
||||
v[1] += s*v1[1];
|
||||
v[2] += s*v1[2];
|
||||
}
|
||||
#endif
|
||||
|
||||
// cloth - object collisions
|
||||
int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt)
|
||||
|
||||
@@ -2726,8 +2726,8 @@ static DerivedMesh *bevelModifier_applyModifier(
|
||||
{
|
||||
DerivedMesh *result;
|
||||
BME_Mesh *bm;
|
||||
bDeformGroup *def;
|
||||
int i, options, defgrp_index = -1;
|
||||
/*bDeformGroup *def;*/
|
||||
int /*i,*/ options, defgrp_index = -1;
|
||||
BevelModifierData *bmd = (BevelModifierData*) md;
|
||||
|
||||
options = bmd->flags|bmd->val_flags|bmd->lim_flags|bmd->e_flags;
|
||||
@@ -5097,7 +5097,6 @@ static void clothModifier_updateDepgraph(
|
||||
|
||||
CustomDataMask clothModifier_requiredDataMask(ModifierData *md)
|
||||
{
|
||||
ClothModifierData *clmd = (ClothModifierData *)md;
|
||||
CustomDataMask dataMask = 0;
|
||||
|
||||
/* ask for vertexgroups if we need them */
|
||||
|
||||
Reference in New Issue
Block a user