Ocean
|
This class implements the base class for all interaction libraries. More...
Public Types | |
typedef std::map< std::string, std::string > | FileExtensions |
Definition of a map mapping file extensions to file type descriptions. More... | |
Public Member Functions | |
const std::string & | name () const |
Returns the name of this library. More... | |
virtual bool | isFileExtensionSupported (const std::string &extension) const |
Returns whether a specified file extension is supported by this interaction plugin. More... | |
virtual bool | load (const UserInterface &userInterface, const Rendering::EngineRef &engine, const Timestamp timestamp, const std::string &filename)=0 |
Loads a new interaction file. More... | |
virtual bool | unload (const UserInterface &userInterface, const Rendering::EngineRef &engine, const Timestamp timestamp, const std::string &filename)=0 |
Unloads one specific loaded interaction files. More... | |
virtual void | unload (const UserInterface &userInterface, const Rendering::EngineRef &engine, const Timestamp timestamp)=0 |
Unloads all loaded scripts. More... | |
virtual void | preFileLoad (const UserInterface &userInterface, const std::string &filename) |
Pre file load interaction function. More... | |
virtual void | postFileLoad (const UserInterface &userInterface, const std::string &filename, const bool succeeded) |
Post file load interaction function. More... | |
virtual Timestamp | preUpdate (const UserInterface &userInterface, const Rendering::EngineRef &engine, const Rendering::ViewRef &view, const Timestamp timestamp) |
Pre update interaction function. More... | |
virtual void | postUpdate (const UserInterface &userInterface, const Rendering::EngineRef &engine, const Rendering::ViewRef &view, const Timestamp timestamp) |
Post update interaction function. More... | |
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. More... | |
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. More... | |
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. More... | |
virtual void | onKeyPress (const UserInterface &userInterface, const Rendering::EngineRef &engine, const std::string &key, const Timestamp timestamp) |
Key press function. More... | |
virtual void | onKeyRelease (const UserInterface &userInterface, const Rendering::EngineRef &engine, const std::string &key, const Timestamp timestamp) |
Key release function. More... | |
virtual void | release () |
Releases this library. More... | |
Protected Member Functions | |
Library (const std::string &name) | |
Creates a new library object. More... | |
virtual | ~Library () |
Destructs a library object. More... | |
FileExtensions | registeredFileExtensions () const |
Returns all registered file extensions. More... | |
void | registerFileExtension (const std::string &extension, const std::string &description) |
Registers an additional file extension. More... | |
Library (const Library &library)=delete | |
Disabled copy constructor. More... | |
Library & | operator= (const Library &library)=delete |
Disabled copy operator. More... | |
Static Protected Member Functions | |
static bool | registerFactory (Library &library) |
Registers a library at the manager. More... | |
static bool | unregisterLibrary (const std::string &library) |
Unregisters a library at the manager. More... | |
Protected Attributes | |
std::string | libraryName |
Library name. More... | |
FileExtensions | libraryFileExtensions |
Map holding accepted file extensions supported by this library. More... | |
Friends | |
class | Manager |
This class implements the base class for all interaction libraries.
typedef std::map<std::string, std::string> Ocean::Interaction::Library::FileExtensions |
Definition of a map mapping file extensions to file type descriptions.
|
protected |
Creates a new library object.
name | The name of the library |
|
protectedvirtual |
Destructs a library object.
|
protecteddelete |
Disabled copy constructor.
library | Object which would be copied |
|
virtual |
Returns whether a specified file extension is supported by this interaction plugin.
extension | File extension to check |
|
pure virtual |
Loads a new interaction file.
userInterface | The application's UI elements |
engine | Current engine |
timestamp | Recent timestmap |
filename | Name of the interaction file to load |
Implemented in Ocean::Interaction::JavaScript::JSLibrary, Ocean::Interaction::Experiences::ExperiencesLibrary, and Ocean::Interaction::Empty::EPYLibrary.
|
inline |
Returns the name of this library.
|
virtual |
Key press function.
userInterface | The application's UI elements |
engine | Rendering engine currently used |
key | Key which has been pressed |
timestamp | Event timestamp |
Reimplemented in Ocean::Interaction::JavaScript::JSLibrary, Ocean::Interaction::Experiences::ExperiencesLibrary, and Ocean::Interaction::Empty::EPYLibrary.
|
virtual |
Key release function.
userInterface | The application's UI elements |
engine | Rendering engine currently used |
key | Key which has been pressed |
timestamp | Event timestamp |
Reimplemented in Ocean::Interaction::JavaScript::JSLibrary, Ocean::Interaction::Experiences::ExperiencesLibrary, and Ocean::Interaction::Empty::EPYLibrary.
|
virtual |
Mouse move event function.
userInterface | The application's UI elements |
engine | Rendering engine currently used |
button | Pressed mouse button |
screenPosition | 2D screen position of the mouse cursor |
ray | 3D picking ray |
pickedObject | Name of the possible picked object |
pickedPosition | Possible intersection point between mouse-pick-ray and 3D object |
timestamp | Event timestamp |
Reimplemented in Ocean::Interaction::JavaScript::JSLibrary, and Ocean::Interaction::Experiences::ExperiencesLibrary.
|
virtual |
Mouse press event function.
userInterface | The application's UI elements |
engine | Rendering engine currently used |
button | Pressed mouse button |
screenPosition | 2D screen position of the mouse cursor |
ray | 3D picking ray |
pickedObject | Name of the possible picked object |
pickedPosition | Possible intersection point between mouse-pick-ray and 3D object |
timestamp | Event timestamp |
Reimplemented in Ocean::Interaction::JavaScript::JSLibrary, and Ocean::Interaction::Experiences::ExperiencesLibrary.
|
virtual |
Mouse release event function.
userInterface | The application's UI elements |
engine | Rendering engine currently used |
button | Released mouse button |
screenPosition | 2D screen position of the mouse cursor |
ray | 3D picking ray |
pickedObject | Name of the possible picked object |
pickedPosition | Possible intersection point between mouse-pick-ray and 3D object |
timestamp | Event timestamp |
Reimplemented in Ocean::Interaction::JavaScript::JSLibrary, and Ocean::Interaction::Experiences::ExperiencesLibrary.
Disabled copy operator.
library | Object which would be copied |
|
virtual |
Post file load interaction function.
userInterface | The application's UI elements |
filename | Filename of the loaded filename |
succeeded | State determining whether the file has been loaded successfully |
Reimplemented in Ocean::Interaction::JavaScript::JSLibrary, Ocean::Interaction::Experiences::ExperiencesLibrary, and Ocean::Interaction::Empty::EPYLibrary.
|
virtual |
Post update interaction function.
userInterface | The application's UI elements |
engine | Engine which has been updated, must be valid |
view | The view which will be used to render, must be valid |
timestamp | Recent update timestamp |
Reimplemented in Ocean::Interaction::JavaScript::JSLibrary, and Ocean::Interaction::Experiences::ExperiencesLibrary.
|
virtual |
Pre file load interaction function.
userInterface | The application's UI elements |
filename | Filename of the file to be loaded |
Reimplemented in Ocean::Interaction::JavaScript::JSLibrary, Ocean::Interaction::Experiences::ExperiencesLibrary, and Ocean::Interaction::Empty::EPYLibrary.
|
virtual |
Pre update interaction function.
This function is invoked before each update process, the application interaction module has the possibility to return a different preferred update timestamp.
userInterface | The application's UI elements |
engine | Engine to be updated, must be valid |
view | The view which will be used to render, must be valid |
timestamp | Recent update timestmap |
Reimplemented in Ocean::Interaction::JavaScript::JSLibrary, and Ocean::Interaction::Experiences::ExperiencesLibrary.
|
inlineprotected |
Returns all registered file extensions.
|
staticprotected |
Registers a library at the manager.
Each library should be registered at most once.
library | Library to register |
|
protected |
Registers an additional file extension.
extension | New file extension to register |
description | Description of the file type |
|
virtual |
Releases this library.
Reimplemented in Ocean::Interaction::Experiences::ExperiencesLibrary.
|
pure virtual |
Unloads all loaded scripts.
userInterface | The application's UI elements |
engine | Current engine |
timestamp | Recent timestmap |
Implemented in Ocean::Interaction::JavaScript::JSLibrary, Ocean::Interaction::Experiences::ExperiencesLibrary, and Ocean::Interaction::Empty::EPYLibrary.
|
pure virtual |
Unloads one specific loaded interaction files.
userInterface | The application's UI elements |
engine | Current engine |
timestamp | Recent timestmap |
filename | Filename of the interaction to be unloaded |
Implemented in Ocean::Interaction::JavaScript::JSLibrary, Ocean::Interaction::Experiences::ExperiencesLibrary, and Ocean::Interaction::Empty::EPYLibrary.
|
staticprotected |
Unregisters a library at the manager.
library | Name of the library to unregister |
|
friend |
|
protected |
Map holding accepted file extensions supported by this library.
|
protected |
Library name.