Getting all files in a specified folder using Boost.

Getting all files in a specified folder using Boost. Also check out how to get files of a specific type, and sorted results here! #include <boost/filesystem.hpp> #include <boost/range/iterator_range.hpp> //returns a list of all the files in a given folder. std::vector<boost::filesystem::directory_entry> GetAllFilesInFolder(boost::filesystem::path folderPath) { try { if (exists(folderPath)) // does p actually exist? { std::vector<boost::filesystem::directory_entry> files; […]

Find a random point between two Vector3 points.

Find a random point between two Vector3 points.   GetRandomVector3Between.cs /// <summary> /// Returns a random vector3 between min and max. (Inclusive) /// </summary> /// <returns>The <see cref=”UnityEngine.Vector3″/>.</returns> /// <param name=”min”>Minimum.</param> /// <param name=”max”>Max.</param> /// https://gist.github.com/Ashwinning/269f79bef5b1d6ee1f83 public Vector3 GetRandomVector3Between (Vector3 min, Vector3 max) { return min + Random.Range (0, 1) * (max – min); } /// […]