32 lines
800 B
C
32 lines
800 B
C
// Copyright 2024 SquareBlock Inc. All Rights Reserved.
|
|
// 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;
|
|
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}) {}
|
|
|
|
Point3d position;
|
|
Vector3d normal;
|
|
Point2d texture_coordinate; // Of course, in world space
|
|
} Vertex;
|
|
|
|
typedef struct Lamp {
|
|
Lamp(const Point3d &pos, const double intensity)
|
|
: position(pos), intensity(intensity) {}
|
|
|
|
Point3d position;
|
|
double intensity;
|
|
} Lamp;
|