public Mesh(Vector3d[] verts, Triangle[] tris, Color3f a, Color3f d, Color3f s, Color3f e, float shininess, Shape3D shape) {
		this.shape = shape;
		vertices = new ArrayList<Vector3d>(verts.length);
		edges = new ArrayList<Edge>(verts.length);
		triangles = new ArrayList<Triangle>(tris.length);

		for (int i = 0; i < verts.length; i++) {
			vertices.add(verts[i]);
		}

		for (int i = 0; i < tris.length; i++) {
			if (tris[i].v0 >= vertices.size() || tris[i].v1 >= vertices.size()
					|| tris[i].v2 >= vertices.size()) {
				throw new ArrayIndexOutOfBoundsException(
						"One or more vertices do not exist. " + tris[i]);
			}
			Edge e0 = new Edge(tris[i].v0, tris[i].v1);
			if (!edges.contains(e0)) {
				edges.add(e0);
			}
			Edge e1 = new Edge(tris[i].v1, tris[i].v2);
			if (!edges.contains(e1)) {
				edges.add(e1);
			}
			Edge e2 = new Edge(tris[i].v2, tris[i].v0);
			if (!edges.contains(e2)) {
				edges.add(e2);
			}
			triangles.add(tris[i]);
		}

		signedDistanceFieldMin = new Vector3d();
		signedDistanceFieldMax = new Vector3d();
		signedDistanceFieldSize = new Vector3d();
		calcSignedDistanceField();
	}