declare setters for optional members

This commit is contained in:
Shuo Feng 2024-02-11 18:00:14 -05:00
parent 2e6a248b3c
commit 287fdec97b
Signed by: sfeng
GPG key ID: 1E83AE6CD1C037B1

View file

@ -13,7 +13,6 @@ public:
enum class Type { Point, Area };
virtual ~Light() = default;
// a pure virtual function for derived class implementation
virtual void illumination() const = 0;
@ -27,6 +26,12 @@ protected:
Matrix4f transform = Matrix4f::Identity(); // optional member `transform`
unsigned int gridSize = 0; // optional member `n`
bool useCenter = false; // optional member `usecenter`
public:
// setters for optional members
void setTransform(const Matrix4f &);
void setGridSize(unsigned int);
void setUseCenter(bool);
};
class PointLight : public Light {