aboutsummaryrefslogtreecommitdiff
path: root/src/o3d/vertex.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/vertex.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/vertex.h')
-rw-r--r--src/o3d/vertex.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/o3d/vertex.h b/src/o3d/vertex.h
index b0dd195..1247fc8 100644
--- a/src/o3d/vertex.h
+++ b/src/o3d/vertex.h
@@ -6,21 +6,13 @@
namespace engine::o3d {
-class Vertex3 {
+class Vertex {
public:
- engine::math::Vector3 point;
+ engine::math::Vector4 vertex;
+ engine::math::Vector3 normal;
VertexData data;
- Vertex3(engine::math::Vector3 point, VertexData data);
-};
-
-class Vertex4 {
- public:
- engine::math::Vector4 point;
- VertexData data;
-
- Vertex4(engine::math::Vector4 point, VertexData data);
- Vertex4(Vertex3 vertex);
+ Vertex(engine::math::Vector4 vertex, engine::math::Vector3 normal, VertexData data);
};
}