vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ScreenSetup.h
Go to the documentation of this file.
1 #pragma once
2 #ifndef __SCREEN_SETUP_H
3 #define __SCREEN_SETUP_H
4 
5 #include <string>
6 
7 #include <osg\Vec3>
8 #include <osg\Quat>
9 #include <vrecko\Ability.h>
10 
11 #include "Solver.h"
12 
13 namespace ht
14 {
15 
17  {
18  public:
19  enum Corner
20  {
25  };
26 
28  {
31 
32  double rim_width;
33  double rim_height;
34  osg::Vec2d monitor_corner;
35 
37 
38  osg::Vec3d wire_position;
39  osg::Quat wire_orientation;
40  double wire_length;
41  };
42 
43  private:
44  // Parameters
45  float wire_length; // Length of measuring wire
46  float rim_width, rim_height; // Width and height of monitor rim (which is measured)
47 
48  // Sensor identification and position
49  osg::Vec3 sensor_position;
50  osg::Quat sensor_orientation;
51  int sensor_number;
52 
53  // Initial values of variables of numerical calculation and its parameters
54  float num_cal_start_step;
55  float num_cal_step_scale;
56  float num_cal_min_step_size;
57 
58  // Calculated variables
59  VariableVec3 monitor_position;
60  VariableQuat monitor_orientation;
61  VariableVec3 sensor_offset;
62 
63  // Numerical calculation
64  ScreenSetupState current_state;
65  Corner current_corner;
66  ListOfFunctions functions;
67  ListOfVariables variables;
68 
69  // Output file name
70  std::string output_file_name;
71 
72  protected:
73  virtual ~ScreenSetup();
74 
75  void SaveSetup();
76 
77  public:
78  ScreenSetup();
79  virtual bool initialize(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *parameters = NULL);
80 
82  DECLARE_INPUT(Record, vrecko::MessageBool);
83  DECLARE_INPUT(NextCorner, vrecko::MessageBool);
84  DECLARE_INPUT(ShowPosition, vrecko::MessageBool);
85  DECLARE_INPUT(RunCalculation, vrecko::MessageBool);
86  };
87 
88 }
89 
90 #endif // __SCREEN_SETUP_H