Implement: - [ ] Add light source (type: point / parallel). - `struct fragment{};` - `class LightSource` - `virtual vector<fragment> getShadingForFragment(face, fragment[x, y, w0, w1, w2], material)` `class ParallelLightSource : LightSource` - `vec3 direction; // defined like gaze in camera` `class PointLightSource : LightSource` - `vec3 location; // defined like eye in camera` - [ ] Add Ambient Light to scene, allow user to control it. - `class AmbientLightSource : LightSource` - `float intensity;`
Implement:
struct fragment{};class LightSourcevirtual vector<fragment> getShadingForFragment(face, fragment[x, y, w0, w1, w2], material)class ParallelLightSource : LightSourcevec3 direction; // defined like gaze in cameraclass PointLightSource : LightSourcevec3 location; // defined like eye in cameraclass AmbientLightSource : LightSourcefloat intensity;