This commit is contained in:
Shuo Feng 2024-03-03 23:22:47 -05:00
parent f98939c206
commit efab58561a
Signed by: sfeng
GPG key ID: 1E83AE6CD1C037B1
6 changed files with 20 additions and 10 deletions

View file

@ -1,7 +1,6 @@
#include "Light.h"
#include <algorithm>
#include <cmath>
#include <iostream>
void Light::setTransform(const Matrix4f &transform) {
this->transform = transform;
@ -11,10 +10,14 @@ void Light::setGridSize(unsigned int gridSize) { this->gridSize = gridSize; }
void Light::setUseCenter(bool useCenter) { this->useCenter = useCenter; }
void Light::setIsUse(bool isUse) { this->use = isUse; }
Vector3f Light::getDiffuse() const { return diffuse; }
Vector3f Light::getSpecular() const { return specular; }
bool Light::isUse() const { return use; }
Vector3f PointLight::illumination(const HitRecord &hit,
const vector<Geometry *> &geometries) const {
Vector3f shadingPoint = hit.getPoint();