aboutsummaryrefslogtreecommitdiff
path: root/src/o3d/deriv_vertex.cpp
diff options
context:
space:
mode:
authorvimene <vincent.menegaux@gmail.com>2023-12-09 06:33:39 +0100
committervimene <vincent.menegaux@gmail.com>2023-12-09 06:33:39 +0100
commitbf39fef7eed69e6d5ecfa272607cbf0fcc53b9a6 (patch)
tree81ac781a634f7618809d6322e1a2d8b544cbc798 /src/o3d/deriv_vertex.cpp
parent19c3e2b83c3c8b58576050b448f2f35d0687e717 (diff)
downloadengine-bf39fef7eed69e6d5ecfa272607cbf0fcc53b9a6.tar.gz
fixed perspective calculations
Diffstat (limited to 'src/o3d/deriv_vertex.cpp')
-rw-r--r--src/o3d/deriv_vertex.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/o3d/deriv_vertex.cpp b/src/o3d/deriv_vertex.cpp
new file mode 100644
index 0000000..dcb2bff
--- /dev/null
+++ b/src/o3d/deriv_vertex.cpp
@@ -0,0 +1,11 @@
+#include "o3d/deriv_vertex.h"
+#include "math/vector.h"
+
+using namespace engine::o3d;
+
+DerivedVertex4::DerivedVertex4(engine::math::Vector4 point, float b0, float b1) : point{point}, b0{b0}, b1{b1} {
+}
+
+DerivedVertex4 DerivedVertex4::div_by_w() const {
+ return {point.div_by_w(), b0, b1};
+}