OpenCOVER
coInteractionManager.h
Go to the documentation of this file.
1/* This file is part of COVISE.
2
3 You can use it under the terms of the GNU Lesser General Public License
4 version 2.1 or later, see lgpl-2.1.txt.
5
6 * License: LGPL 2+ */
7
8#ifndef CO_INTERACTIONMANAGER
9#define CO_INTERACTIONMANAGER
10
11#include <map>
12#include <memory>
13#include <list>
14
16
17#include <vrb/client/SharedState.h>
18
19namespace vrui
20{
21
22class OPENVRUIEXPORT coInteractionManager
23{
24public:
29 //virtual ~coInteractionManager();
30
31 bool update();
32 //initialize the sheredState for remote locking this group if neccecary
33 void registerGroup(int group);
38
40 void resetLocks(int id);
41 void doRemoteLock(int groupId);
42 void doRemoteUnLock(int groupId);
44private:
45 // list of registered interactions
46 std::list<coInteraction *> interactionStack[coInteraction::NumInteractorTypes];
47 // list of active but unregistered interactions
48 std::list<coInteraction *> activeUnregisteredInteractions[coInteraction::NumInteractorTypes];
49 //store the client id that locked a interaction group. -1 if not locked
50 std::map<int, std::unique_ptr<vrb::SharedState<int>>> remoteLocks;
51 //setup SharedState for this group
52 void initializeRemoteLock(int group);
53 bool naviagationBlockedByme = false;
54
55protected:
57};
58}
59#endif
collaborative interface manager
Definition: coVRCommunication.h:41
Definition: coInteraction.h:18
InteractionGroup
Definition: coInteraction.h:76
InteractionType
Definition: coInteraction.h:45
@ NumInteractorTypes
Definition: coInteraction.h:72
Definition: coInteractionManager.h:23
void registerInteraction(coInteraction *)
void doRemoteLock(int groupId)
void registerGroup(int group)
static coInteractionManager * the()
coInteractionManager & operator=(const coInteractionManager &)=delete
void unregisterInteraction(coInteraction *)
static coInteractionManager * im
Definition: coInteractionManager.h:56
void doRemoteUnLock(int groupId)
bool isOneActive(coInteraction::InteractionType type)
coInteractionManager(const coInteractionManager &)=delete
bool isOneActive(coInteraction::InteractionGroup group)