COGS
Computer Graphics Structures library
Mesh.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 COGS_MESH_H
7 #define COGS_MESH_H
8 #include <memory>
9 
10 #include <COGS/PointCloud.h>
11 #include <COGS/Triangulation.h>
12 #include <COGS/MaterialModel.h>
13 #include <COGS/API.h>
14 
15 namespace cogs
16 {
21  struct COGS_API Mesh
22  {
23  public:
24  std::shared_ptr<PointCloud> points;
25  std::shared_ptr<Triangulation> faces;
26  std::shared_ptr<MaterialModel> material;
27 
29  [[nodiscard]] bool HasPoints() const;
30 
32  [[nodiscard]] bool HasFaces() const;
33 
35  [[nodiscard]] bool HasMaterial() const;
36 
38  virtual bool Import(const std::string &filename);
39 
41  virtual bool Export(const std::string &filename) const;
42  };
43 
53  std::vector<glm::vec4> COGS_API CalculateTangentArray(const cogs::Mesh &mesh);
54 
55 
56  cogs::Mesh COGS_API JoinMeshes(const std::vector<cogs::Mesh> &meshes_to_join);
57 
58 }
59 
60 #endif /* !COGS_MESH_H */
A Mesh is structure containing a point-cloud a triangulation and a material. Not all of these are req...
Definition: Mesh.h:21
Namespace of "Computer Graphic Structures" library, which implement many core classes and structures...
Definition: AabbHierarchy.h:8
std::vector< glm::vec4 > COGS_API CalculateTangentArray(const cogs::Mesh &mesh)
Calculates tangent vectors for each point of an input mesh.