vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Cut.h
Go to the documentation of this file.
1 #ifndef CUT_H
2 #define CUT_H
3 
4 #include "../EditorController/ControllableAbility.h"
5 #include <helpers/DynamicArray.h>
6 #include "SnapObject.h"
7 
8 using namespace vrecko;
9 
10 //DERIVED FROM ObjectSelector.h
11 namespace APConnectEditor
12 {
13  //class Cut: public Ability
14  class Cut: public ControllableAbility
15  {
16  public:
17  Cut();
18  virtual ~Cut();
19 
20  virtual void update();
21 
22  protected:
23  virtual void fillDefaultInfo();
24  virtual bool activate();
25  virtual void deactivate();
26 
27  void issueRequests(bool bStopIfNoSelection);
28  virtual bool loadXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *pParametersNode);
29  void menuItemClicked(const char* itemID);
30 
31  bool closeLoop();
32  void showCuttingLoop();
33  void showCloseCuttingLoop();
34  void createNewCuttingLoop();
35  void cutObject();
36  bool addNewPartObject(set<int> partSet, bool move);
37  void optimalizeCuttingLoop();
38  void resetCuttingLoop();
39  void processPoint(osg::Vec3 point);
40 
41 
42  bool isMenu;
44  vector<int> cuttingLoop;
49  unsigned long freeID;
50 
51  osg::Vec3 lastPosition, lastSelTest;
52 
53  unsigned long selObjectID;
55 
56  void resolveSelection();
57  EnvironmentObject* resolveIntersections(osg::Vec3 &position, std::vector<osg::Node*> **nodePath = NULL);
58  // [nodePath] can be NULL if not necessary.
59  };
60 
61 }// end of namespace APSnap
62 
63 
64 #endif //CUT_H
65 
66 
67