public void addLine(float x0, float y0, float z0, float xf, float yf, float zf, float lineWidth, Color startColor, Color endColor)
{
MeshDataHolder lineMeshData = MeshDataGenerator.Line(x0, y0, z0, xf, yf, zf, lineWidth);
Point3D32[] vertices = lineMeshData.getVertices();
TexCoord2f[] texturePoints = lineMeshData.getTexturePoints();
Point3D32 start = new Point3D32(x0, y0, z0);
Point3D32 end = new Point3D32(xf, yf, zf);
for (int i = 0; i < vertices.length; i++)
{
if (vertices[i].distanceSquared(start) < vertices[i].distanceSquared(end))
texturePoints[i].set(colorPalette.getTextureLocation(startColor));
else
texturePoints[i].set(colorPalette.getTextureLocation(endColor));
}
meshBuilder.addMesh(lineMeshData);
}