MeshTools.hpp 809 B

123456789101112131415161718
  1. #pragma once
  2. // Include modules
  3. #include "OptiTrackPoint.hpp"
  4. #include "SteamVRTrackPoint.hpp"
  5. // Include dependencies
  6. #include "lib3mf_implicit.hpp"
  7. #include <osg/Array>
  8. class MeshTools {
  9. public:
  10. static void calculateNormals(const std::vector<Lib3MF::sPosition> verticesBuffer, const std::vector<Lib3MF::sTriangle> triangleBuffer, osg::ref_ptr<osg::Vec3Array> vertices, osg::ref_ptr<osg::Vec3Array> normals);
  11. static float angleBetween(osg::Vec3 a, osg::Vec3 b);
  12. static float compensationLength(osg::Vec3 a, osg::Vec3 b, float length);
  13. static bool optiTrackSanityCheck(const std::vector<OptiTrackPoint*> points, const bool showSuccessMessage);
  14. static bool steamVrTrackCollisionCheck(std::vector<SteamVRTrackPoint*> points, const bool showSuccessMessage, osg::ref_ptr<osg::Group> verifyGroup);
  15. };