8 #ifndef META_OCEAN_SCENEDESCRIPTION_LIBRARY_H
9 #define META_OCEAN_SCENEDESCRIPTION_LIBRARY_H
19 namespace SceneDescription
36 class OCEAN_SCENEDESCRIPTION_EXPORT
Library
68 inline const std::string& name()
const;
127 inline unsigned int priority()
const;
162 virtual SceneRef loadTransient(
const std::string& filename,
const std::string& fileExtension,
float* progress,
bool* cancel);
184 unsigned int priority_ = 0u;
This template class implements a object reference with an internal reference counter.
Definition: base/ObjectRef.h:58
This class is the base class for all scene description libraries.
Definition: scenedescription/Library.h:37
Library & operator=(const Library &library)=delete
Disabled copy operator.
Library(const std::string &name, const DescriptionType descriptionType, const unsigned int priority)
Creates a new library object.
DescriptionType descriptionType() const
Returns the description type supported by the library.
Definition: scenedescription/Library.h:206
std::map< std::string, std::string > FileExtensions
Definition of a map mapping file extensions to file type descriptions.
Definition: scenedescription/Library.h:46
const std::string & name() const
Returns the name of the library.
Definition: scenedescription/Library.h:196
virtual NodeRefs nodes(const std::string &name) const
Returns all node references of all available scene description nodes with a specified name.
virtual SceneRef loadPermanent(const std::string &filename, const std::string &fileExtension, const Rendering::EngineRef &engine, const Timestamp ×tamp, float *progress, bool *cancel)
Loads a new scene by a given filename and returns a scene hierarchy which can be used permanently.
unsigned int priority() const
Returns the priority of this library.
Definition: scenedescription/Library.h:216
DescriptionType descriptionType_
Supported scene description type.
Definition: scenedescription/Library.h:190
FileExtensions fileExtensions_
Map holding accepted file extensions supported by this library.
Definition: scenedescription/Library.h:187
void registerFileExtension(const std::string &extension, const std::string &description)
Registers an additional file extension.
virtual NodeRef node(const std::string &name) const
Returns the node reference of the first available scene description node with a specified name.
virtual void release()
Releases the library.
FileExtensions registeredFileExtensions() const
Returns all registered file extensions.
Definition: scenedescription/Library.h:201
std::string name_
The name of the library.
Definition: scenedescription/Library.h:181
virtual ~Library()
Destructs a library object.
static bool unregisterLibrary(const std::string &library)
Unregisters a library at the manager.
NodeRefManager nodeRefManager_
Node reference manager for this library only.
Definition: scenedescription/Library.h:193
NodeRefManager & nodeManager() const
Returns the node reference manager of this library.
Definition: scenedescription/Library.h:211
virtual SceneRef loadTransient(const std::string &filename, const std::string &fileExtension, float *progress, bool *cancel)
Loads a new scene by a given filename and returns a transient scene hierarchy which can be converted ...
unsigned int priority_
The priority of this library, the higher the value, the higher the priority.
Definition: scenedescription/Library.h:184
Library(const Library &library)=delete
Disabled copy constructor.
SceneRef load(const std::string &filename, const std::string &fileExtension, const Rendering::EngineRef &engine, const Timestamp ×tamp, const DescriptionType descriptionType, float *progress=nullptr, bool *cancel=nullptr)
Loads a new scene by a given filename.
This class implements the manager for all scene descriptions.
Definition: scenedescription/Manager.h:101
This class implements a scene description node reference manager.
Definition: NodeRefManager.h:32
This template class implements a smart object reference which is a specialization of an ObjectRef obj...
Definition: SmartObjectRef.h:90
This class implements a timestamp.
Definition: Timestamp.h:36
DescriptionType
Definition of different scene description types.
Definition: SceneDescription.h:64
std::vector< NodeRef > NodeRefs
Definition of a vector holding scene description node references.
Definition: scenedescription/Node.h:42
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15