vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
WIM.h
Go to the documentation of this file.
1 #include <vrecko/Ability.h>
3 
4 #include <osg/MatrixTransform>
5 
6 #include <esg/OSGAdapter.h>
7 
8 using namespace vrecko;
9 
10 namespace behindO {
11 
12 class WIM: public Ability {
13  public:
14  WIM();
15  ~WIM() {};
16 
17  // ------ BaseClass functions ------------------------
19  void processEvent(const std::string &input_name, void *value);
20  // ---------------------------------------------------
21 
22  void postInitialize(void);
23  void update(void);
24 
25  bool loadXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *parametersNode);
26  XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *saveXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *);
27 
28  std::string getAcceptableMessages(void) {return "boolean|state";} // true/false, 0/1
29  Message *getMessage(void) {return NULL;}
30 
31  protected:
32  int control, zooming;
33  typedef struct {
35  osg::Vec3 last_position;
36  osg::Matrix last_rotation;
37  } ObjectCopy;
38 
39  std::map<EnvironmentObject *, ObjectCopy> copies_map;
40  EnvironmentObject *border_object, *copies_root;
41  osg::MatrixTransform *visual_border_object;
42  osg::Vec3 WIM_size, WIM_center;
43  float WIM_scale, origin_WIM_scale;
44  bool WIM_commit; // 0=during/1=after operation
45 
46  bool avatar_copy, work_area_selection;
47  esg::BVH *border_bvh;
49 
50  EnvironmentObject *owner, *pAvatarCopy, *pAvatarOwner;
51 };
52 
53 }
54 
55 //$Id: WIM.h 1 2010-10-27 12:01:29Z xbezdeka $