PointShape.hpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. // Include modules
  3. #include "TrackSystemSettingsStructs.hpp"
  4. #include "enums.hpp"
  5. // Include dependencies
  6. #include <osg/Vec3>
  7. #include <osg/Group>
  8. #include <osg/MatrixTransform>
  9. #include <osg/ShapeDrawable>
  10. #include <osg/Switch>
  11. #include <osg/Geode>
  12. #include "lib3mf_implicit.hpp"
  13. class PointShape {
  14. public:
  15. static void loadSteamvrThread();
  16. PointShape(const osg::ref_ptr<osg::Group> renderRoot, const ActiveTrackingSystem activeTrackingSystem, osg::Vec3f point, osg::Vec3f normal, osg::Vec3f normalModifier);
  17. ~PointShape();
  18. void moveTo(osg::Vec3f position);
  19. void setNormalModifier(osg::Vec3f normalModifier);
  20. void rotateToNormalVector(osg::Vec3f normal);
  21. void setVisibility(bool mode);
  22. void setColor(osg::Vec4 color);
  23. void setupOptiTrack(OptiTrackSettings optiTrackSettings);
  24. void setupSteamVRTrack(SteamVRTrackSettings steamVrTrackSettings);
  25. void setupActionPoints();
  26. osg::ref_ptr<osg::Geode> getMesh();
  27. private:
  28. osg::ref_ptr<osg::Switch> _selectionSwitch;
  29. osg::ref_ptr<osg::MatrixTransform> _selectionTranslateGroup;
  30. osg::ref_ptr<osg::MatrixTransform> _selectionRotateGroup;
  31. osg::ref_ptr<osg::MatrixTransform> _selectionMoveToEndGroup;
  32. osg::ref_ptr<osg::MatrixTransform> _screwMove;
  33. osg::ref_ptr<osg::Group> _renderRoot;
  34. osg::ref_ptr<osg::ShapeDrawable> _shape;
  35. osg::ref_ptr<osg::Geode> _thread;
  36. osg::ref_ptr<osg::Geode> _geode;
  37. osg::Vec3f _normalModifier;
  38. double _optiTrackSteamVRLength;
  39. ActiveTrackingSystem _activeTrackingSystem;
  40. };