TrackPoint.hpp 977 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include <osg/ref_ptr>
  3. #include <osg/Vec3>
  4. #include <osg/MatrixTransform>
  5. class TrackPoint {
  6. public:
  7. TrackPoint(const osg::Vec3 point, const osg::Vec3 normal, const osg::Vec3 normalModifier, const float normalRotation, const bool compensation);
  8. osg::Vec3 getTranslation();
  9. osg::Vec3 getRotation();
  10. osg::Vec3 getNormal();
  11. osg::Vec3 getNormalModifier();
  12. osg::Vec3 getTrackPoint();
  13. float getNormalRotation();
  14. bool getCompensation();
  15. void updateNormalModifier(osg::Vec3 normalModifier);
  16. void updatePositions(osg::Vec3 origin);
  17. void updateNormalRotation(float normalRotation);
  18. void updateCompensation(bool compensation);
  19. protected:
  20. osg::ref_ptr<osg::MatrixTransform> _translationGroup;
  21. osg::ref_ptr<osg::MatrixTransform> _rotationGroup;
  22. osg::ref_ptr<osg::MatrixTransform> _originFixGroup;
  23. osg::Vec3 _trackOrigin;
  24. osg::Vec3 _origin;
  25. osg::Vec3 _normal;
  26. osg::Vec3 _normalModifier;
  27. float _normalRotation;
  28. bool _compensation;
  29. };