OpenCOVER
VRRegisterSceneGraph.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 VR_REGISTER_SG_H
9#define VR_REGISTER_SG_H
10
11#include <util/coExport.h>
12
13#include <osg/Node>
14#include <string>
15#include <iostream>
16
17namespace opencover
18{
19
20class COVEREXPORT VRRegisterSceneGraph
21{
22
23private:
24 static VRRegisterSceneGraph *s_instance;
25 int registerId;
26 bool blocked;
27 bool active;
28 std::string whole_message;
29 std::string transparency_message;
30 std::string sceneGraphAppendixIdString;
31
32protected:
34
35 void createRegisterMessage(osg::Node *node, std::string parent);
36 void createUnregisterMessage(osg::Node *node, std::string parent);
37 void createTransparencyMessage(osg::Node *node);
41
42 std::string createName(std::string);
43
44public:
47
48 void setRegisterStartIndex(int startIndex);
49
50 void registerNode(osg::Node *node, std::string parent);
51 void unregisterNode(osg::Node *node, std::string parent);
52
53 void block()
54 {
55 blocked = true;
56 };
57 void activate()
58 {
59 active = true;
60 };
61 void unblock()
62 {
63 blocked = false;
64 };
65 bool isBlocked()
66 {
67 return blocked;
68 };
69};
70}
71#endif
Definition: ARToolKit.h:33
Definition: VRRegisterSceneGraph.h:21
void createUnregisterMessage(osg::Node *node, std::string parent)
static VRRegisterSceneGraph * instance()
std::string createName(std::string)
void unregisterNode(osg::Node *node, std::string parent)
void block()
Definition: VRRegisterSceneGraph.h:53
void createTransparencyMessage(osg::Node *node)
void setRegisterStartIndex(int startIndex)
void unblock()
Definition: VRRegisterSceneGraph.h:61
void registerNode(osg::Node *node, std::string parent)
void createRegisterMessage(osg::Node *node, std::string parent)
void activate()
Definition: VRRegisterSceneGraph.h:57
bool isBlocked()
Definition: VRRegisterSceneGraph.h:65