diff --git a/src/TriangleMesh.cpp b/src/TriangleMesh.cpp index f89501ec58d9ed6bc58006858e19e621c492c6c3..0cc768f79cb5a226c3bcd5227ef53cd02c65fc9f 100644 --- a/src/TriangleMesh.cpp +++ b/src/TriangleMesh.cpp @@ -1341,7 +1341,7 @@ void ActiveMesh::RenderOneTimeTexture(const i3d::Image3d<i3d::GRAY16>& mask, } -void ActiveMesh::CenterMesh(void) +void ActiveMesh::CenterMesh(const float safeConstant) { //calc geom. centre, double x=0.,y=0.,z=0.; @@ -1368,12 +1368,6 @@ void ActiveMesh::CenterMesh(void) y/=double(Pos.size()); z/=double(Pos.size()); - //to determine scene size, we assume that - //the filopodia length will be max diameter of the cell body, - //and multiply with certain "safe" constant (=1.0); - //all of it integrated into one constant: - float safeConstant=3.f; - meshPlaygroundSize.x=safeConstant*(xMax-xMin); meshPlaygroundSize.y=safeConstant*(yMax-yMin); meshPlaygroundSize.z=safeConstant*(zMax-zMin); diff --git a/src/TriangleMesh.h b/src/TriangleMesh.h index 5272489a855c75e9ae47afbcaf3bd4638c9e123e..5ecec9c564b892485fb2de7cc241e62baac0be7c 100644 --- a/src/TriangleMesh.h +++ b/src/TriangleMesh.h @@ -149,9 +149,16 @@ class ActiveMesh void ScaleMesh(const Vector3F& scale); void TranslateMesh(const Vector3F& shift); - ///sets the optimal size and translation vectors (defined below), - ///it does not alter the mesh - void CenterMesh(void); + /** + * sets the optimal size and translation vectors (defined below), + * it does not alter the mesh + * + * to determine scene size, we assume that + * the filopodia length will be max diameter of the cell body, + * and multiply with certain "safe" constant (=1.0); + * all of it integrated into one constant: + */ + void CenterMesh(const float safeConstant=3.f); ///optimal output image size in microns Vector3F meshPlaygroundSize; ///default mesh translation to appear approx. in the output image centre