aboutsummaryrefslogtreecommitdiff
path: root/src/o3d/tri.h
diff options
context:
space:
mode:
authorvimene <vincent.menegaux@gmail.com>2023-12-11 12:42:46 +0100
committervimene <vincent.menegaux@gmail.com>2023-12-11 12:42:46 +0100
commit6b765a85cf81bf4b7162e4c9280dd4054581c611 (patch)
tree4156dff7c632e6511fe18daebeea506744ad1ff7 /src/o3d/tri.h
parentff2c784d4c4100f0301628e8a52a6910d776d067 (diff)
downloadengine-6b765a85cf81bf4b7162e4c9280dd4054581c611.tar.gz
improved mesh definition
- In the context of mesh definition, splited indices into vertex index, normal index and vertex data index to be able to specify different normals and vertex data for different faces using the same vertex
Diffstat (limited to 'src/o3d/tri.h')
-rw-r--r--src/o3d/tri.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/o3d/tri.h b/src/o3d/tri.h
index 715f649..7fa37fe 100644
--- a/src/o3d/tri.h
+++ b/src/o3d/tri.h
@@ -1,22 +1,23 @@
-#ifndef O3D_TRI_VERTEX_H
-#define O3D_TRI_VERTEX_H
+#ifndef O3D_TRI_H
+#define O3D_TRI_H
#include <vector>
#include "o3d/vertex.h"
-#include "o3d/tri_deriv_vertex.h"
+#include "o3d/tri.h"
+#include "o3d/tri_deriv.h"
namespace engine::o3d {
-class TriangleVertex4 {
+class Triangle {
public:
- Vertex4 vertex1;
- Vertex4 vertex2;
- Vertex4 vertex3;
+ Vertex vertex1;
+ Vertex vertex2;
+ Vertex vertex3;
- TriangleVertex4(Vertex4 vertex1, Vertex4 vertex2, Vertex4 vertex3);
- TriangleDerivedVertex4 to_derived() const;
+ Triangle(Vertex vertex1, Vertex vertex2, Vertex vertex3);
+ TriangleDerived to_derived() const;
};
}
-#endif // O3D_TRI_VERTEX_H
+#endif // O3D_TRI_H