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

ADD: Generator made sensitive to texture_image_border config parameter.

parent 73a953ed
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -138,10 +138,14 @@ int main(int argc,char **argv)
	//we have to utilize the images _offset_ attribute, instead of
	//translating all mesh points, to assure the meshes appear within
	//the produced images
	mesh.meshShift=minBB -Vector3F(2.5f);
	mesh.meshPlaygroundSize=(maxBB-minBB) +Vector3F(5.0f);
	Vector3F borderSize( (maxBB-minBB)/100.f );
	borderSize.x *= mesh.configFile.texture_borderWidth.x;
	borderSize.y *= mesh.configFile.texture_borderWidth.y;
	borderSize.z *= mesh.configFile.texture_borderWidth.z;
	mesh.meshShift=minBB -borderSize;
	mesh.meshPlaygroundSize=(maxBB-minBB) +2.f*borderSize;
	//NB: We also introduce 1um thick border around the mesh
	std::cout << "corners of a detected bounding box (with 1um thick border):\n";
	std::cout << "corners of a detected bounding box:\n";
	std::cout << "[" << minBB.x << "," << minBB.y << "," << minBB.z << "] <-> ["
	          << maxBB.x << "," << maxBB.y << "," << maxBB.z << "] in microns\n";