TrackPoint.hpp 564 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include <osg/ref_ptr>
  3. #include <osg/Vec3>
  4. #include <osg/MatrixTransform>
  5. class TrackPoint {
  6. public:
  7. TrackPoint(osg::Vec3 point, osg::Vec3 normal);
  8. osg::ref_ptr<osg::MatrixTransform> getUppermostRoot();
  9. osg::Vec3 getTranslation();
  10. osg::Vec3 getRotation();
  11. osg::Vec3 getTrackPoint();
  12. protected:
  13. osg::ref_ptr<osg::MatrixTransform> _translationGroup;
  14. osg::ref_ptr<osg::MatrixTransform> _rotationGroup;
  15. osg::ref_ptr<osg::MatrixTransform> _originFixGroup;
  16. private:
  17. osg::Vec3 _origin;
  18. osg::Vec3 _normal;
  19. osg::Vec3 _trackOrigin;
  20. };