MinusculeRender/src/phone_material.h

28 lines
588 B
C++

// Copyright 2024 SquareBlock Inc. All Rights Reserved.
// Author: tianlei.richard@qq.com (tianlei.richard)
#pragma once
#include <filesystem>
#include <opencv2/core/core.hpp>
#include <vector>
#include "common.h"
// Bling-Phone Matrerial
class PhoneMaterial {
public:
using TextureId = uint32_t;
PhoneMaterial(const std::vector<std::filesystem::path> &texture_path);
public:
cv::Vec3b sample_texture(const TextureId texture_id,
const Point2d &texture_coordinate);
private:
std::vector<cv::Mat> textures_;
uint32_t illumination_intensity_;
};