8 #ifndef META_OCEAN_INTERACTION_MANAGER_H
9 #define META_OCEAN_INTERACTION_MANAGER_H
46 typedef std::unordered_set<std::string>
NameSet;
51 typedef std::vector<std::string>
Names;
88 inline bool handlesMouseEvents()
const;
220 inline Lock& lock()
const;
This class is the base class for all plugin manager able to load and manager files.
Definition: FileManager.h:26
std::map< std::string, std::string > FileExtensions
Definition of a map mapping supported file extensions to file type descriptions.
Definition: FileManager.h:32
This class implements the base class for all interaction libraries.
Definition: interaction/Library.h:29
This class implements the manager for all interaction libraries / plugins.
Definition: interaction/Manager.h:32
bool unload(const UserInterface &userInterface, const Rendering::EngineRef &engine, const Timestamp timestamp, const std::string &filename)
Unloads one specific loaded interaction files.
void onKeyRelease(const UserInterface &userInterface, const Rendering::EngineRef &engine, const std::string &key, const Timestamp timestamp)
Key release function.
std::unordered_set< std::string > NameSet
Definition of a set holding names of interaction libraries.
Definition: interaction/Manager.h:46
Lock & lock() const
Retruns the lock object of this engine.
Definition: interaction/Manager.h:267
bool handlesMouseEvents() const
Returns whether currently at least one interaction library handles mouse events.
Definition: interaction/Manager.h:262
void postFileLoad(const UserInterface &userInterface, const std::string &filename, const bool succeeded)
Post file load interaction function.
void onKeyPress(const UserInterface &userInterface, const Rendering::EngineRef &engine, const std::string &key, const Timestamp timestamp)
Key press function.
void registerMouseEventLibrary(const std::string &name)
Registers an interaction library handling mouse events.
bool unregisterLibrary(const std::string &name)
Unregisters a library.
void unload(const UserInterface &userInterface, const Rendering::EngineRef &engine, const Timestamp timestamp)
Unloads all loaded interaction files.
std::vector< std::string > Names
Definition of a vector holding names.
Definition: interaction/Manager.h:51
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.
void preFileLoad(const UserInterface &userInterface, const std::string &filename)
Pre file load interaction function.
NameSet mouseEventLibraries_
Set holding all names of libraries interested in mouse events.
Definition: interaction/Manager.h:256
Lock lock_
Manager lock.
Definition: interaction/Manager.h:259
void postUpdate(const UserInterface &userInterface, const Rendering::EngineRef &engine, const Rendering::ViewRef &view, const Timestamp timestamp)
Post update interaction function.
void registerLibrary(Library &library)
Registers a new interaction library able to read a specific interaction format.
std::unordered_set< Library * > LibrarySet
Definition of a set holding registered interaction libraries.
Definition: interaction/Manager.h:41
virtual ~Manager()
Destructs a manager.
bool load(const UserInterface &userInterface, const Rendering::EngineRef &engine, const Timestamp timestamp, const std::string &filename)
Loads a new interaction file.
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.
void release()
Releases all interaction libraries.
LibrarySet librarySet_
Set holding all registered interaction libraries.
Definition: interaction/Manager.h:250
Manager()
Creates a new manager.
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.
bool unregisterMouseEventLibrary(const std::string &name)
Unregisters an interaction library handling mouse events.
Timestamp preUpdate(const UserInterface &userInterface, const Rendering::EngineRef &engine, const Rendering::ViewRef &view, const Timestamp timestamp)
Pre update interaction function.
virtual FileExtensions supportedExtensions()
Returns all currently supported file extensions.
Names libraries() const
Returns the names of all currently registered libraries.
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 recursive lock object.
Definition: Lock.h:31
This template class is the base class for all singleton objects.
Definition: Singleton.h:71
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