mirror of
https://github.com/vonhyou/ray-tracer-comp371.git
synced 2025-06-08 07:22:01 +00:00
commit
This commit is contained in:
parent
f98939c206
commit
efab58561a
6 changed files with 20 additions and 10 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue