vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BehindObstacleExp_wT.h
Go to the documentation of this file.
1 #ifndef BEHINDOBSTACLE_WT_H
2 #define BEHINDOBSTACLE_WT_H
3 
4 #include <vrecko/Ability.h>
5 
6 #include <osg/Geode>
7 #include <osgText/Text>
8 #include <osgText/Font>
9 #include <osg/BlendFunc>
10 #include <osg/Material>
11 #include <osg/StateSet>
12 
13 
14 using namespace vrecko;
15 
16 
18  public:
21 
22  void preInitialize(void);
23  void postInitialize(void);
24 
25  void processEvent(const std::string &input_name, void *value);
26 
27  void update(void);
28 
29  bool loadXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *parametersNode);
30  XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *saveXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *);
31 
32  protected:
33  void createScenes(void);
34  void setScene(int scene_id);
35  void initScene(int scene_id);
36  void setAllBindingForMethod(int method_id);
37  int checkLocation(int scene_id);
38  void resetView(void);
39 
40  std::string getInfoString(void);
41 
42 
43  osg::Timer timer;
44  osg::Timer_t start_tick, end_tick;
45  int current_state, internal_state, test_counter;
47  std::ofstream result_file;
48  std::string user_name;
49  bool stereoscopic, two_handed, large_projection, dynamics_used;
50  int current_method, last_method, grasp_count;
51 
52  typedef struct {
53  int nic;
54  } ExperimentRec;
55 
56  std::map<std::string, ExperimentRec> experiment_map;
57  std::string method_desc[20];
58 
59  // textual information
60  osgText::Text *experiment_description, *timer_board, *remaining_tests, *method_board;
61  osg::Geode *text_geode;
62  osg::Material *text_material;
63  osg::StateSet *text_state;
64  osgText::Font *texture_font;
65  int font_size;
66  osg::BlendFunc *transp;
67  EnvironmentObject *pCube1, *pCube2, *pCube3, *pObstacle1, *pObstacle2, *pObstacle3, *pObstacle4, *pFloor;
68  EnvironmentObject *pObstacle5, *pObstacle6, *pObstacle7, *pObstacle8;
69  EnvironmentObject *pObstacle9, *pObstacle10, *pObstacle11, *pObstacle12;
70  EnvironmentObject *pObstacle13, *pObstacle14, *pObstacle15, *pObstacle16;
71  EnvironmentObject *pObstacle17, *pObstacle18, *pObstacle19, *pObstacle20;
73 
74  EnvironmentObject *pEOAvatar, *owner, *pLeftHand, *pRightHand, *pWIMEO, *pCuttingPlaneEO, *pCuttingPlaneEO2;
75  EnvironmentObject *pMirrorEO1, *pMirrorEO2, *pMirrorEO3;
76  long int lefthand_id, righthand_id;
77  Ability *pHMDHeadManipulator, *pHeadManipulator, *pManipulator, *pCenterObjectManipulator;
78  Ability *pCuttingPlane, *pCuttingPlane2, *pChangeOfVisibility, *pMirror1, *pMirror2, *pMirror3, *pWIM, *pAvatarManipulator, *pMappingFunctions[2];
79  osg::MatrixTransform *pTempl[3];
80  osg::Vec3 final_object_position[3];
81  osg::Matrix final_object_rotation[3];
82 };
83 
84 
85 #endif
86 
87 //$Id: BehindObstacleExp_wT.h 1 2010-10-27 12:01:29Z xbezdeka $