15#include <vsg/core/Inherit.h>
16#include <vsg/core/observer_ptr.h>
17#include <vsg/io/FileSystem.h>
18#include <vsg/maths/transform.h>
19#include <vsg/state/StateCommand.h>
20#include <vsg/utils/Instrumentation.h>
33 using ReaderWriters = std::vector<ref_ptr<ReaderWriter>>;
36 class VSG_DECLSPEC Options :
public Inherit<Object, Options>
40 Options(
const Options& rhs,
const CopyOp& copyop = {});
42 template<
typename... Args>
43 explicit Options(Args... args)
48 Options& operator=(
const Options& rhs) =
delete;
54 void add(
const ReaderWriters& rws);
57 ReaderWriters readerWriters;
63 CHECK_ORIGINAL_FILENAME_EXISTS_FIRST,
67 FindFileHint checkFilenameHint = CHECK_ORIGINAL_FILENAME_EXISTS_FIRST;
71 using FindFileCallback = std::function<
Path(
const Path& filename,
const Options* options)>;
72 FindFileCallback findFileCallback;
77 bool mapRGBtoRGBAHint =
true;
110 void read(
Input& input)
override;
111 void write(
Output& output)
const override;
122 template<
typename... Args>
123 bool compatibleExtension(
const vsg::Path& filename,
const vsg::Options* options,
const Args&... args)
125 if (options && options->extensionHint && contains(options->extensionHint, args...))
return true;
126 return contains(vsg::lowerCaseFileExtension(filename), args...);
130 template<
typename... Args>
131 bool compatibleExtension(
const vsg::Options* options,
const Args&... args)
133 return options && options->extensionHint && contains(options->extensionHint, args...);
Definition CommandLine.h:44
Find all the objects that should be treated as dynamic (their values change.)
Definition FindDynamicObjects.h:25
Definition OperationThreads.h:26
Class for passing IO related options to vsg::read/write calls.
Definition Options.h:37
std::map< Path, CoordinateConvention > formatCoordinateConventions
Coordinate convention to assume for specified lower case file formats extensions.
Definition Options.h:83
ref_ptr< FindDynamicObjects > findDynamicObjects
mechanism for finding dynamic objects in loaded scene graph
Definition Options.h:101
FindFileHint
Hint to use when searching for Paths with vsg::findFile(filename, options);.
Definition Options.h:62
@ CHECK_ORIGINAL_FILENAME_EXISTS_LAST
check the filename exists with its original path before trying to find it in Options::paths.
Definition Options.h:64
@ ONLY_CHECK_PATHS
check the filename exists with its original path after failing to find it in Options::paths.
Definition Options.h:65
ref_ptr< Object > clone(const CopyOp ©op={}) const override
Definition Options.h:107
CoordinateConvention sceneCoordinateConvention
Coordinate convention to use for scene graph.
Definition Options.h:80
virtual bool readOptions(CommandLine &arguments)
read command line options, assign values to this options object to later use with reading/writing fil...
ref_ptr< Instrumentation > instrumentation
Hook for assigning Instrumentation to enable profiling of record traversal.
Definition Options.h:98
int compare(const Object &rhs) const override
compare two objects, return -1 if this object is less than rhs, return 0 if it's equal,...
StateCommands inheritedState
Definition Options.h:95
ref_ptr< PropagateDynamicObjects > propagateDynamicObjects
mechanism for propogating dynamic objects classification up parental chain so that cloning is done on...
Definition Options.h:104
std::map< std::string, ref_ptr< ShaderSet > > shaderSets
Definition Options.h:91
Propagate classification of objects as dynamic to all parents.
Definition PropagateDynamicObjects.h:25
Base class for providing support for reading and/or writing various file formats and IO protocols.
Definition ReaderWriter.h:35
ShaderSet provides a collection of shader related settings to provide a form of shader introspection.
Definition ShaderSet.h:115
class for facilitating the sharing of instances of objects that have the same properties.
Definition SharedObjects.h:32