added free functions to collect the static and moving curves that will be used in build bvh method