Ocean
Ocean::Interaction::Experiences::Experience Class Reference

This class is the base class for all experiences defined via the interaction plugin mechanism. More...

Public Member Functions

virtual ~Experience ()=default
 Destructs the experience. More...
 
virtual bool load (const UserInterface &userInterface, const Rendering::EngineRef &engine, const Timestamp timestamp, const std::string &properties=std::string())
 Loads this experience. More...
 
virtual bool unload (const UserInterface &userInterface, const Rendering::EngineRef &engine, const Timestamp timestamp)
 Unloads this experience. 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 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 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 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...
 

Protected Member Functions

 Experience ()=default
 Creates a new experience object. More...
 
virtual bool preLoad (const UserInterface &userInterface, const Rendering::EngineRef &engine, const Timestamp timestamp, const std::string &properties)
 Event function before the experience is loaded. More...
 
virtual bool postUnload (const UserInterface &userInterface, const Rendering::EngineRef &engine, const Timestamp timestamp)
 Event function after the experience is unloaded. More...
 
virtual void release ()
 Explicitly releases this experience. More...
 

Friends

class ExperiencesLibrary
 

Detailed Description

This class is the base class for all experiences defined via the interaction plugin mechanism.

An experience can be anything which combines rendering with user input and sensor information like e.g., 6-DOF trackers.
This base class mainly defines several event functions which can be used to realize an experience.

Constructor & Destructor Documentation

◆ ~Experience()

virtual Ocean::Interaction::Experiences::Experience::~Experience ( )
virtualdefault

Destructs the experience.

◆ Experience()

Ocean::Interaction::Experiences::Experience::Experience ( )
protecteddefault

Creates a new experience object.

Member Function Documentation

◆ load()

virtual bool Ocean::Interaction::Experiences::Experience::load ( const UserInterface userInterface,
const Rendering::EngineRef engine,
const Timestamp  timestamp,
const std::string &  properties = std::string() 
)
virtual

Loads this experience.

Parameters
userInterfaceThe application's UI elements
engineCurrent engine
timestampRecent timestamp
propertiesOptional properties for the experience
Returns
True, if succeeded

◆ onKeyPress()

virtual void Ocean::Interaction::Experiences::Experience::onKeyPress ( const UserInterface userInterface,
const Rendering::EngineRef engine,
const std::string &  key,
const Timestamp  timestamp 
)
virtual

Key press function.

See also
Library::onKeyPress().

◆ onKeyRelease()

virtual void Ocean::Interaction::Experiences::Experience::onKeyRelease ( const UserInterface userInterface,
const Rendering::EngineRef engine,
const std::string &  key,
const Timestamp  timestamp 
)
virtual

Key release function.

See also
Library::onKeyRelease().

◆ onMouseMove()

virtual void Ocean::Interaction::Experiences::Experience::onMouseMove ( const UserInterface userInterface,
const Rendering::EngineRef engine,
const std::string &  button,
const Vector2 screenPosition,
const Line3 ray,
const Timestamp  timestamp 
)
virtual

Mouse move event function.

See also
Library::onMouseMove().

◆ onMousePress()

virtual void Ocean::Interaction::Experiences::Experience::onMousePress ( const UserInterface userInterface,
const Rendering::EngineRef engine,
const std::string &  button,
const Vector2 screenPosition,
const Line3 ray,
const Timestamp  timestamp 
)
virtual

Mouse press event function.

See also
Library::onMousePress().

◆ onMouseRelease()

virtual void Ocean::Interaction::Experiences::Experience::onMouseRelease ( const UserInterface userInterface,
const Rendering::EngineRef engine,
const std::string &  button,
const Vector2 screenPosition,
const Line3 ray,
const Timestamp  timestamp 
)
virtual

Mouse release event function.

See also
Library::onMouseRelease().

◆ postUnload()

virtual bool Ocean::Interaction::Experiences::Experience::postUnload ( const UserInterface userInterface,
const Rendering::EngineRef engine,
const Timestamp  timestamp 
)
protectedvirtual

Event function after the experience is unloaded.

See also
Library::unload().

◆ postUpdate()

virtual void Ocean::Interaction::Experiences::Experience::postUpdate ( const UserInterface userInterface,
const Rendering::EngineRef engine,
const Rendering::ViewRef view,
const Timestamp  timestamp 
)
virtual

Post update interaction function.

See also
Library::postUpdate().

◆ preLoad()

virtual bool Ocean::Interaction::Experiences::Experience::preLoad ( const UserInterface userInterface,
const Rendering::EngineRef engine,
const Timestamp  timestamp,
const std::string &  properties 
)
protectedvirtual

Event function before the experience is loaded.

Parameters
userInterfaceThe application's UI elements
engineCurrent engine
timestampRecent timestmap
propertiesOptional properties for the experience
Returns
True, if succeeded

◆ preUpdate()

virtual Timestamp Ocean::Interaction::Experiences::Experience::preUpdate ( const UserInterface userInterface,
const Rendering::EngineRef engine,
const Rendering::ViewRef view,
const Timestamp  timestamp 
)
virtual

Pre update interaction function.

See also
Library::preUpdate().

◆ release()

virtual void Ocean::Interaction::Experiences::Experience::release ( )
protectedvirtual

Explicitly releases this experience.

◆ unload()

virtual bool Ocean::Interaction::Experiences::Experience::unload ( const UserInterface userInterface,
const Rendering::EngineRef engine,
const Timestamp  timestamp 
)
virtual

Unloads this experience.

See also
Library::unload().

Friends And Related Function Documentation

◆ ExperiencesLibrary

friend class ExperiencesLibrary
friend

The documentation for this class was generated from the following file: