sculpto
trimesh.h
Go to the documentation of this file.
1/*!****************************************************************//*!*
2 * \file trimesh.h
3 * \brief Topology object triangles mesh class declaration module.
4 *
5 * \author Sabitov Kirill
6 * \date 08 July 2022
7 *********************************************************************/
8
9#pragma once
10
11#include "basis.h"
12#include "../vertex.h"
13
14namespace scl::topology
15{
17 class trimesh : public basis<vertex>
18 {
19 public:
22
23 /*!*
24 * Topology object triangles mesh default cconstructor.
25 *
26 * \param Vertices - triangle mesh vertices.
27 * \param Indieces - triangle mesh vertices indices.
28 */
29 trimesh(const std::vector<vertex> &Vertices, const std::vector<u32> &Indieces);
30
31 /*!*
32 * Topology object triangles mesh default cconstructor.
33 *
34 * \param Vertices - triangle mesh vertices.
35 * \param Indieces - triangle mesh vertices indices.
36 */
37 trimesh(const std::vector<vertex> &&Vertices, const std::vector<u32> &&Indieces);
38
40 ~trimesh() override = default;
41
42 /*!*
43 * Topology object mesh bound box evaluation function.
44 *
45 * \param None.
46 * \return None.
47 */
48 virtual void EvaluateBoundBox();
49
50 /*!*
51 * Topology object mesh vertices normals evaluation function.
52 *
53 * \param None.
54 * \return None.
55 */
56 virtual void EvaluateNormals();
57
58 /*!*
59 * Topology object mesh vertices tangent space evaluation function.
60 *
61 * \param None.
62 * \return None.
63 */
64 virtual void EvaluateTangentSpace();
65
66 /*!*
67 * Evaluate tangent space of single triangle function.
68 *
69 * \param P0, P1, P2 - triangle vertices.
70 * \return None.
71 */
72 static bool EvaluateTriangleTangentSpace(vertex &P0, vertex &P1, vertex &P2);
73
74 /*!*
75 * Evaluate orthoganal tangent space basis of vertex function.
76 *
77 * \param P - vertex to evaluate orthoganal tangent space basis.
78 * \return None.
79 */
81 };
82}
std::vector< vertex > Vertices
Definition: basis.h:22
virtual void EvaluateBoundBox()
Definition: trimesh.cpp:22
virtual void EvaluateNormals()
Definition: trimesh.cpp:33
virtual void EvaluateTangentSpace()
Definition: trimesh.cpp:47
static bool EvaluateTriangleTangentSpace(vertex &P0, vertex &P1, vertex &P2)
Definition: trimesh.cpp:72
static void EvaluateVertexOrthoganalTBNBasis(vertex &P)
Definition: trimesh.cpp:95
~trimesh() override=default
mesh_type
Definition: vertex_array.h:18