TrackPoint.hpp 638 B

1234567891011121314151617181920212223242526
  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);
  8. osg::Vec3 getTranslation();
  9. osg::Vec3 getRotation();
  10. osg::Vec3 getNormal();
  11. osg::Vec3 getNormalModifier();
  12. osg::Vec3 getTrackPoint();
  13. protected:
  14. osg::ref_ptr<osg::MatrixTransform> _translationGroup;
  15. osg::ref_ptr<osg::MatrixTransform> _rotationGroup;
  16. osg::ref_ptr<osg::MatrixTransform> _originFixGroup;
  17. osg::Vec3 _trackOrigin;
  18. private:
  19. osg::Vec3 _origin;
  20. osg::Vec3 _normal;
  21. osg::Vec3 _normalModifier;
  22. };