MinusculeRender/src/common.h

24 lines
624 B
C
Raw Normal View History

2024-03-22 20:12:09 +08:00
// Copyright 2024 SquareBlock Inc. All Rights Reserved.
2024-03-05 21:43:08 +08:00
// Author: tianlei.richard@qq.com (tianlei.richard)
#pragma once
#include <opencv2/core/core.hpp>
#include <Eigen/Dense>
using Vector3d = Eigen::Vector3d;
using Point2d = Eigen::Vector2d;
using Point3d = Eigen::Vector3d;
using BBox = cv::Rect2i;
2024-03-06 22:23:48 +08:00
using TransformMatrix = Eigen::Matrix<double, 4, 4>;
typedef struct Vertex {
Vertex(const Point3d &p, const Vector3d &n, const Point2d &tex_coor)
: position(p), normal(n), texture_coordinate({tex_coor, 1.}) {}
Point3d position;
Vector3d normal;
std::pair<Point2d, double> texture_coordinate;
} Vertex;