aboutsummaryrefslogtreecommitdiff
path: root/src/o3d/vertex.cpp
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.cpp
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.cpp')
-rw-r--r--src/o3d/vertex.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/o3d/vertex.cpp b/src/o3d/vertex.cpp
index ec9c05f..5845e27 100644
--- a/src/o3d/vertex.cpp
+++ b/src/o3d/vertex.cpp
@@ -4,11 +4,6 @@
using namespace engine::o3d;
-Vertex3::Vertex3(engine::math::Vector3 point, VertexData data) : point{point}, data{data} {
-}
-
-Vertex4::Vertex4(engine::math::Vector4 point, VertexData data) : point{point}, data{data} {
-}
-
-Vertex4::Vertex4(Vertex3 vertex) : point{vertex.point}, data{vertex.data} {
+Vertex::Vertex(engine::math::Vector4 vertex, engine::math::Vector3 normal, VertexData data)
+ : vertex{vertex}, normal{normal}, data{data} {
}