8#ifndef META_OCEAN_INTERACTION_LIBRARY_H
9#define META_OCEAN_INTERACTION_LIBRARY_H
45 inline const std::string&
name()
const;
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.
std::map< std::string, std::string > FileExtensions
Definition of a map mapping file extensions to file type descriptions.
Definition interaction/Library.h:37
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
friend class Manager
Definition interaction/Library.h:30
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.
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 holds UI elements of the application from which the interaction is executed.
Definition UserInterface.h:28
This class implements a timestamp.
Definition Timestamp.h:64
VectorT2< Scalar > Vector2
Definition of a 2D vector.
Definition Vector2.h:28
VectorT3< Scalar > Vector3
Definition of a 3D vector.
Definition Vector3.h:29
LineT3< Scalar > Line3
Definition of the Line3 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with single o...
Definition Line3.h:27
Ocean::ObjectRef< Engine > EngineRef
Definition of an engine reference object.
Definition Engine.h:30
size_t ObjectId
Definition of a object id.
Definition rendering/Rendering.h:59
SmartObjectRef< View > ViewRef
Definition of a smart object reference holding a view node.
Definition View.h:39
Namespace of the Interaction library.
Definition Empty.h:19
The namespace covering the entire Ocean framework.
Definition Accessor.h:15