8 #ifndef META_OCEAN_INTERACTION_LIBRARY_H
9 #define META_OCEAN_INTERACTION_LIBRARY_H
45 inline const std::string& name()
const;
This class implements the base class for all interaction libraries.
Definition: interaction/Library.h:29
void registerFileExtension(const std::string &extension, const std::string &description)
Registers an additional file extension.
virtual void onKeyRelease(const UserInterface &userInterface, const Rendering::EngineRef &engine, const std::string &key, const Timestamp timestamp)
Key release function.
virtual bool unload(const UserInterface &userInterface, const Rendering::EngineRef &engine, const Timestamp timestamp, const std::string &filename)=0
Unloads one specific loaded interaction files.
virtual void onMouseRelease(const UserInterface &userInterface, const Rendering::EngineRef &engine, const std::string &button, const Vector2 &screenPosition, const Line3 &ray, const Rendering::ObjectId pickedObject, const Vector3 &pickedPosition, const Timestamp timestamp)
Mouse release event function.
Library(const Library &library)=delete
Disabled copy constructor.
virtual bool isFileExtensionSupported(const std::string &extension) const
Returns whether a specified file extension is supported by this interaction plugin.
FileExtensions libraryFileExtensions
Map holding accepted file extensions supported by this library.
Definition: interaction/Library.h:242
const std::string & name() const
Returns the name of this library.
Definition: interaction/Library.h:245
virtual void postFileLoad(const UserInterface &userInterface, const std::string &filename, const bool succeeded)
Post file load interaction function.
virtual void onMouseMove(const UserInterface &userInterface, const Rendering::EngineRef &engine, const std::string &button, const Vector2 &screenPosition, const Line3 &ray, const Rendering::ObjectId pickedObject, const Vector3 &pickedPosition, const Timestamp timestamp)
Mouse move event function.
virtual void preFileLoad(const UserInterface &userInterface, const std::string &filename)
Pre file load interaction function.
virtual void onMousePress(const UserInterface &userInterface, const Rendering::EngineRef &engine, const std::string &button, const Vector2 &screenPosition, const Line3 &ray, const Rendering::ObjectId pickedObject, const Vector3 &pickedPosition, const Timestamp timestamp)
Mouse press event function.
virtual ~Library()
Destructs a library object.
Library & operator=(const Library &library)=delete
Disabled copy operator.
virtual Timestamp preUpdate(const UserInterface &userInterface, const Rendering::EngineRef &engine, const Rendering::ViewRef &view, const Timestamp timestamp)
Pre update interaction function.
virtual void release()
Releases this library.
static bool registerFactory(Library &library)
Registers a library at the manager.
std::string libraryName
Library name.
Definition: interaction/Library.h:239
static bool unregisterLibrary(const std::string &library)
Unregisters a library at the manager.
virtual void unload(const UserInterface &userInterface, const Rendering::EngineRef &engine, const Timestamp timestamp)=0
Unloads all loaded scripts.
FileExtensions registeredFileExtensions() const
Returns all registered file extensions.
Definition: interaction/Library.h:250
virtual void onKeyPress(const UserInterface &userInterface, const Rendering::EngineRef &engine, const std::string &key, const Timestamp timestamp)
Key press function.
Library(const std::string &name)
Creates a new library object.
std::map< std::string, std::string > FileExtensions
Definition of a map mapping file extensions to file type descriptions.
Definition: interaction/Library.h:37
virtual bool load(const UserInterface &userInterface, const Rendering::EngineRef &engine, const Timestamp timestamp, const std::string &filename)=0
Loads a new interaction file.
virtual void postUpdate(const UserInterface &userInterface, const Rendering::EngineRef &engine, const Rendering::ViewRef &view, const Timestamp timestamp)
Post update interaction function.
This class implements the manager for all interaction libraries / plugins.
Definition: interaction/Manager.h:32
This class holds UI elements of the application from which the interaction is executed.
Definition: UserInterface.h:28
This class implements an infinite line in 3D space.
Definition: Line3.h:70
This class implements a timestamp.
Definition: Timestamp.h:36
size_t ObjectId
Definition of a object id.
Definition: rendering/Rendering.h:59
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15