MinusculeRender/src/minus_renderer.cc

30 lines
635 B
C++
Raw Normal View History

2024-03-01 21:31:47 +08:00
// Copyright 2024 Bytedance Inc. All Rights Reserved.
// Author: tianlei.richard@qq.com (tianlei.richard)
2024-03-01 16:00:08 +08:00
#include <Eigen/Dense>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "spdlog/spdlog.h"
#include "spdlog/fmt/ostr.h" // github.com/gabime/spdlog/issues/1638
2024-03-05 21:43:08 +08:00
#include "common.h"
2024-03-01 21:31:47 +08:00
#include "rasterizer.h"
#include "triangle.h"
2024-03-01 16:00:08 +08:00
using namespace Eigen;
2024-03-01 21:31:47 +08:00
int main(int argc, char *argv[]) {
const int width = 1280;
const int height = 720;
2024-03-05 21:43:08 +08:00
Triangle t{Point3d{1, 1, -2}, Point3d{3, 1, -2}, Point3d{2, 4, -2}};
2024-03-01 16:00:08 +08:00
2024-03-01 21:31:47 +08:00
Rasterizer rasterizer{width, height};
rasterizer.rasterize(t);
2024-03-01 16:00:08 +08:00
return 0;
}