GEOM
Computer Graphics Structures library
Meshes.h
1 /*
2  Copyright (C) Skeletex Research, s.r.o. - All Rights Reserved
3  Unauthorized copying of this file, via any medium is strictly prohibited
4  Proprietary and confidential
5 */
6 #ifndef GEOM_MESHES_H
7 #define GEOM_MESHES_H
8 
9 #include <vector>
10 #include <set>
11 #include <memory>
12 #include <limits>
13 
14 #include <glm/glm.hpp>
15 //#include <Utils/Meshes.h>
16 #include <Utils/GeometryStructures.h>
17 
18 #include <GEOM/API.h>
19 
20 namespace geom
21 {
22  //GEOM_API void ScaleMesh(meshes::IndexedFace &mesh, const glm::vec3 &scale);
23  //GEOM_API void ScaleMesh(meshes::IndexedFace &mesh, const float scale);
24  //GEOM_API void TranslateMesh(meshes::IndexedFace &mesh, const glm::vec3 &translation);
25 
26 // calculates v surface volume of 2D triangle
27  GEOM_API float GetTriangleVolume(const glm::vec2 &a, const glm::vec2 &b, const glm::vec2 &c);
28 
29 // calculates v surface volume of 3D triangle
30  GEOM_API float GetTriangleVolume(const glm::vec3 &a, const glm::vec3 &b, const glm::vec3 &c);
31 
32 // calculate normal of triangle
33  GEOM_API glm::vec3 GetTriangleNormalCW(glm::vec3 p0, glm::vec3 p1, glm::vec3 p2);
34  GEOM_API glm::vec3 GetTriangleNormalCCW(glm::vec3 p0, glm::vec3 p1, glm::vec3 p2);
35 
36  //GEOM_API void CalculateTangents(std::shared_ptr<meshes::IndexedFace> &mesh);
37 
38  //GEOM_API std::vector<unsigned> GetShortestCut(const meshes::IndexedFace &mesh, const unsigned start_vert, const unsigned end_vert);
39  //GEOM_API std::vector<unsigned> GetShortestCutWeighted(const meshes::IndexedFace &mesh, const unsigned start_vert, const unsigned end_vert);
40 
41  GEOM_API bool LineTriangleIntersection(const geom::Triangle3 triangle, const geom::Line3 &line, glm::vec3 &out_intersection);
42 
43  GEOM_API glm::vec3 GetCentroid(std::vector<float> &vertices);
44  GEOM_API glm::vec3 GetVertexLowestY(std::vector<float> &vertices);
45 }
46 #endif /* !GEOM_MESHES_H */
Definition: Constructors.h:9