Commit 0a0ae6fe authored by Vladimír Ulman's avatar Vladimír Ulman
Browse files

Originally internal parameter 'safeConstant' is now a parameter of the ActiveMesh::CenterMesh().

parent e63293b8
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -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);
+10 −3
Original line number Diff line number Diff line
@@ -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