point.subtract(origin, compVec1);
float lineParameter = direction.dot(compVec1);
origin.add(direction.mult(lineParameter, compVec2), compVec2);
compVec2.subtract(point, compVec1);
float len = compVec1.lengthSquared();
vars.release();
return len;
}
public float distance(Vector3f point) {
return FastMath.sqrt(distanceSquared(point));