Commit: 4e01e2580d2d30bc00a55c0589dd64f9b476523e
Author: mattoverby
Date: Thu Aug 13 10:21:46 2020 -0500
Branches: soc-2020-soft-body
https://developer.blender.org/rB4e01e2580d2d30bc00a55c0589dd64f9b476523e
macos warnings
===================================================================
M intern/softbody/admmpd_api.cpp
M intern/tetgen/tetgen_api.cpp
===================================================================
diff --git a/intern/softbody/admmpd_api.cpp b/intern/softbody/admmpd_api.cpp
index a405526d5f5..c265a7d0368 100644
--- a/intern/softbody/admmpd_api.cpp
+++ b/intern/softbody/admmpd_api.cpp
@@ -282,28 +282,6 @@ static inline int admmpd_init_as_cloth(ADMMPDInterfaceData
*iface, Object *ob, f
return 1;
}
-// Given the mesh, options, and data, initializes the solver
-static inline int admmpd_reinit_solver(ADMMPDInterfaceData *iface)
-{
- if (!iface) { return 0; }
- if (!iface->idata) { return 0; }
- if (!iface->idata->mesh) { return 0; }
- if (!iface->idata->options) { return 0; }
- if (!iface->idata->data) { return 0; }
-
- try {
- admmpd::Solver().init(
- iface->idata->mesh.get(),
- iface->idata->options.get(),
- iface->idata->data.get());
- }
- catch(const std::exception &e) {
- strcpy_error(iface, e.what());
- return 0;
- }
- return 1;
-}
-
int admmpd_mesh_needs_update(ADMMPDInterfaceData *iface, Object *ob)
{
if (!iface) { return 0; }
diff --git a/intern/tetgen/tetgen_api.cpp b/intern/tetgen/tetgen_api.cpp
index fd5714a891e..b985c7c05a1 100644
--- a/intern/tetgen/tetgen_api.cpp
+++ b/intern/tetgen/tetgen_api.cpp
@@ -25,34 +25,33 @@ void init_tetgenremeshdata(TetGenRemeshData *data)
// Finds the largest edge length of the mesh and computes the volume
// if that were an edge of a tet using (e^3 / (6*sqrt(2)))
-static float compute_maxvol(float *verts, unsigned int *faces, int num_faces)
-{
- auto squared_norm = [](float *v0, float *v1)
- {
- return (v0[0]-v1[0])*(v0[0]-v1[0]) +
- (v0[1]-v1[1])*(v0[1]-v1[1]) +
- (v0[2]-v1[2])*(v0[2]-v1[2]);
- };
- float max_sq_edge_len = 0;
- for (int i=0; i<num_faces; ++i)
- {
- unsigned int f[3] = {faces[i*3], faces[i*3+1], faces[i*3+2]};
- float v0[3] = {verts[f[0]*3], verts[f[0]*3+1], verts[f[0]*3+2]};
- float v1[3] = {verts[f[1]*3], verts[f[1]*3+1], verts[f[1]*3+2]};
- float v2[3] = {verts[f[2]*3], verts[f[2]*3+1], verts[f[2]*3+2]};
- float max_sq_e = std::max(std::max(
- squared_norm(v0,v1),
- squared_norm(v1,v2)),
- squared_norm(v2,v0));
-
- if( max_sq_e > max_sq_edge_len)
- max_sq_edge_len = max_sq_e;
- }
-
- double e = std::sqrt(max_sq_edge_len);
- return (e*e*e) / (6.f*std::sqrt(2.f));
-
-} // end compute maxvol
+//static float compute_maxvol(float *verts, unsigned int *faces, int num_faces)
+//{
+// auto squared_norm = [](float *v0, float *v1)
+// {
+// return (v0[0]-v1[0])*(v0[0]-v1[0]) +
+// (v0[1]-v1[1])*(v0[1]-v1[1]) +
+// (v0[2]-v1[2])*(v0[2]-v1[2]);
+// };
+// float max_sq_edge_len = 0;
+// for (int i=0; i<num_faces; ++i)
+// {
+// unsigned int f[3] = {faces[i*3], faces[i*3+1], faces[i*3+2]};
+// float v0[3] = {verts[f[0]*3], verts[f[0]*3+1], verts[f[0]*3+2]};
+// float v1[3] = {verts[f[1]*3], verts[f[1]*3+1], verts[f[1]*3+2]};
+// float v2[3] = {verts[f[2]*3], verts[f[2]*3+1], verts[f[2]*3+2]};
+// float max_sq_e = std::max(std::max(
+// squared_norm(v0,v1),
+// squared_norm(v1,v2)),
+// squared_norm(v2,v0));
+//
+// if( max_sq_e > max_sq_edge_len)
+// max_sq_edge_len = max_sq_e;
+// }
+//
+// double e = std::sqrt(max_sq_edge_len);
+// return (e*e*e) / (6.f*std::sqrt(2.f));
+//} // end compute maxvol
static void make_tetgenio(
float *verts,
@@ -101,11 +100,11 @@ static void make_tetgenio(
bool tetgen_resmesh(TetGenRemeshData *tg)
{
// float maxvol = compute_maxvol(tg->in_verts, tg->in_faces,
tg->in_totfaces);
- float quality = 1.4;
+// float quality = 1.4;
// Set up the switches
std::stringstream switches;
-// switches << "Q"; // quiet
+ switches << "Q"; // quiet
// switches << "a" << maxvol;
// if (quality>0)
// switches << "q" << quality;
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs