aboutsummaryrefslogtreecommitdiff
path: root/src/fb
diff options
context:
space:
mode:
Diffstat (limited to 'src/fb')
-rw-r--r--src/fb/chfb.cpp10
-rw-r--r--src/fb/chfb.h2
-rw-r--r--src/fb/pixfb.cpp10
-rw-r--r--src/fb/pixfb.h2
4 files changed, 12 insertions, 12 deletions
diff --git a/src/fb/chfb.cpp b/src/fb/chfb.cpp
index 82b8f86..c0e5cc7 100644
--- a/src/fb/chfb.cpp
+++ b/src/fb/chfb.cpp
@@ -2,7 +2,7 @@
#include <array>
#include <cmath>
#include <vector>
-#include "math/math_vector.h"
+#include "math/vector.h"
#include "o3d/vertex.h"
#include "o3d/tri_vertex.h"
#include "o3d/vertex_data.h"
@@ -133,13 +133,13 @@ void CharacterFrameBuffer::draw_triangle(engine::o3d::TriangleVertex4 triangle)
t1_2.vertex2.point.x *= 2.f;
t1_2.vertex3.point.x *= 2.f;
for (auto t2 : t1_2.crop_xy_out(-1.f, 1.f, -1.f, 1.f)) {
- engine::math::MathVector2 pp1 = t2.vertex1.point.xy(),
+ engine::math::Vector2 pp1 = t2.vertex1.point.xy(),
pp2 = t2.vertex2.point.xy(),
pp3 = t2.vertex3.point.xy();
if ((pp2 - pp1).det(pp3 - pp1) >= 0.f) continue;
- t2.vertex1.point = (t2.vertex1.point + engine::math::MathVector3{1.f, 1.f, 0.f}) / 2.f;
- t2.vertex2.point = (t2.vertex2.point + engine::math::MathVector3{1.f, 1.f, 0.f}) / 2.f;
- t2.vertex3.point = (t2.vertex3.point + engine::math::MathVector3{1.f, 1.f, 0.f}) / 2.f;
+ t2.vertex1.point = (t2.vertex1.point + engine::math::Vector3{1.f, 1.f, 0.f}) / 2.f;
+ t2.vertex2.point = (t2.vertex2.point + engine::math::Vector3{1.f, 1.f, 0.f}) / 2.f;
+ t2.vertex3.point = (t2.vertex3.point + engine::math::Vector3{1.f, 1.f, 0.f}) / 2.f;
float fw = static_cast<float>(w), fh = static_cast<float>(h);
t2.vertex1.point.x = t2.vertex1.point.x * fw - .5f;
t2.vertex1.point.y = t2.vertex1.point.y * fh - .5f;
diff --git a/src/fb/chfb.h b/src/fb/chfb.h
index 1bf8b69..9e10a0d 100644
--- a/src/fb/chfb.h
+++ b/src/fb/chfb.h
@@ -2,7 +2,7 @@
#define FB_CHFB_H
#include <vector>
-#include "math/math_vector.h"
+#include "math/vector.h"
#include "o3d/tri_vertex.h"
namespace engine::fb {
diff --git a/src/fb/pixfb.cpp b/src/fb/pixfb.cpp
index c9e9927..af220c6 100644
--- a/src/fb/pixfb.cpp
+++ b/src/fb/pixfb.cpp
@@ -3,7 +3,7 @@
#include <cmath>
#include <vector>
#include <cstdint>
-#include "math/math_vector.h"
+#include "math/vector.h"
#include "o3d/vertex.h"
#include "o3d/tri_vertex.h"
#include "o3d/vertex_data.h"
@@ -130,13 +130,13 @@ void PixelFrameBuffer::draw_triangle(engine::o3d::TriangleVertex4 triangle) {
face_ind++;
for (auto t1 : triangle.crop_z_out(-1.f, 1.f)) {
for (auto t2 : t1.div_by_w().crop_xy_out(-1.f, 1.f, -1.f, 1.f)) {
- engine::math::MathVector2 pp1 = t2.vertex1.point.xy(),
+ engine::math::Vector2 pp1 = t2.vertex1.point.xy(),
pp2 = t2.vertex2.point.xy(),
pp3 = t2.vertex3.point.xy();
if ((pp2 - pp1).det(pp3 - pp1) >= 0.f) continue;
- t2.vertex1.point = (t2.vertex1.point + engine::math::MathVector3{1.f, 1.f, 0.f}) / 2.f;
- t2.vertex2.point = (t2.vertex2.point + engine::math::MathVector3{1.f, 1.f, 0.f}) / 2.f;
- t2.vertex3.point = (t2.vertex3.point + engine::math::MathVector3{1.f, 1.f, 0.f}) / 2.f;
+ t2.vertex1.point = (t2.vertex1.point + engine::math::Vector3{1.f, 1.f, 0.f}) / 2.f;
+ t2.vertex2.point = (t2.vertex2.point + engine::math::Vector3{1.f, 1.f, 0.f}) / 2.f;
+ t2.vertex3.point = (t2.vertex3.point + engine::math::Vector3{1.f, 1.f, 0.f}) / 2.f;
float fw = static_cast<float>(w), fh = static_cast<float>(h);
t2.vertex1.point.x = t2.vertex1.point.x * fw - .5f;
t2.vertex1.point.y = t2.vertex1.point.y * fh - .5f;
diff --git a/src/fb/pixfb.h b/src/fb/pixfb.h
index bf37d51..cdfac18 100644
--- a/src/fb/pixfb.h
+++ b/src/fb/pixfb.h
@@ -3,7 +3,7 @@
#include <vector>
#include <cstdint>
-#include "math/math_vector.h"
+#include "math/vector.h"
#include "o3d/tri_vertex.h"
namespace engine::fb {