// Copyright 2024 SquareBlock Inc. All Rights Reserved. // Author: tianlei.richard@qq.com (tianlei.richard) #pragma once #include #include #include #include "common.h" #include "texture.h" // Bling-Phone Matrerial class PhoneMaterial { public: PhoneMaterial(const std::unordered_map> &textures, const std::shared_ptr &lamp); cv::Vec3b shade(const Vertex &shading_point, const Point3d &view_point); private: static constexpr int defaultAttenuationFactor = 16; private: std::shared_ptr point_lamp_; std::unordered_map> textures_; // Ambient Related cv::Vec3b Ka; // Specular Related cv::Vec3b Ks; int specular_attenuation_factor_; };