I just implemented a simple program, that can query closest point on mesh fast with AABB three. check it out InstantClosestPoint. No template! easy to read and use.