add tree functions for trimesh