Scene Lab
An open source project by
FPL.
|
Utility functions that might be useful if you are using Scene Lab. More...
Classes | |
class | SceneLab |
class | FlatbufferEditor |
class | EditorController |
class | EditorGui |
class | BasicCamera |
struct | AssetLoader |
AssetLoader struct, basically a tuple of directory, file extension, and loader function. More... | |
Typedefs | |
typedef std::function< void(const GenericEntityId &entity)> | EntityCallback |
typedef std::function< void()> | EditorCallback |
Functions | |
std::unordered_map < std::string, time_t > | ScanDirectory (const std::string &directory, const std::string &file_ext) |
time_t | LoadAssetsIfNewer (time_t threshold, const std::vector< AssetLoader > &asset_loaders) |
Load assets via the designated asset loaders. More... | |
time_t | LoadAssetsIfNewer (time_t threshold, const std::string &directory, const std::string &file_extension, const AssetLoader::load_function_t &load_function) |
Scan a directory for assets matching a given file extension. More... | |
Variables | |
static const mathfu::vec3 | kCameraForward = mathfu::kAxisY3f |
static const mathfu::vec3 | kCameraSide = mathfu::kAxisX3f |
static const mathfu::vec3 | kCameraUp = mathfu::kAxisZ3f |
Utility functions that might be useful if you are using Scene Lab.
time_t scene_lab::LoadAssetsIfNewer | ( | time_t | threshold, |
const std::vector< AssetLoader > & | asset_loaders | ||
) |
Load assets via the designated asset loaders.
Scans through the directory specified by each AssetLoader for the given file pattern, and calls the load function on each file that's strictly newer than the specified timestamp.
Returns the timestamp of the latest file loaded (so you can pass that into the next run of this function), or 0 if no files were loaded.
time_t scene_lab::LoadAssetsIfNewer | ( | time_t | threshold, |
const std::string & | directory, | ||
const std::string & | file_extension, | ||
const AssetLoader::load_function_t & | load_function | ||
) |
Scan a directory for assets matching a given file extension.
Any files in the directory that are strictly newer than the time threshold will be loaded via calling the load function passed in.
Returns the timestamp of the latest file loaded (so you can pass that into the next run of this function), or 0 if no files were loaded.