Class scene#

Nested Relationships#

Nested Types#

Class Documentation#

class scene#

Class to load files into.

The scene where files and meshes can be added and loaded into.

Example usage:

std::string path = ...
f3d::engine eng(f3d::window::Type::NATIVE);
f3d::scene& load = eng.getScene();

if (load.supports(path)
{
  load.add(path);
}

Unnamed Group

virtual scene &add(const std::filesystem::path &filePath) = 0#

Add and load provided files into the scene Already added file will NOT be reloaded

virtual scene &add(const std::vector<std::filesystem::path> &filePath) = 0#

Add and load provided files into the scene Already added file will NOT be reloaded

virtual scene &add(const std::vector<std::string> &filePathStrings) = 0#

Add and load provided files into the scene Already added file will NOT be reloaded

Unnamed Group

inline scene &add(std::initializer_list<std::string> list)#

Convenience initializer list signature for add method

inline scene &add(std::initializer_list<std::filesystem::path> list)#

Convenience initializer list signature for add method

Public Functions

virtual scene &add(const mesh_t &mesh) = 0#

Add and load provided mesh into the scene

virtual scene &clear() = 0#

Clear the scene of all added files

virtual bool supports(const std::filesystem::path &filePath) = 0#

Return true if provided file path is supported, false otherwise.

virtual scene &loadAnimationTime(double timeValue) = 0#

Load added files at provided time value if they contain any animation Providing a timeVale outside of the current animationTimeRange will clamp to the closest value in the range. Does not do anything if there is no animations.

virtual std::pair<double, double> animationTimeRange() = 0#

Get animation time range of currently added files. Returns [0, 0] if there is no animations.

struct load_failure_exception : public f3d::exception#

An exception that can be thrown by the scene when it failed to load a file for some reason.

Public Functions

inline explicit load_failure_exception(const std::string &what = "")#