This repository has been archived on 2024-12-30. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
2024CG-project-render/include/Light.h
github-classroom[bot] 6eef377959
Initial commit
2024-10-11 10:27:35 +00:00

23 lines
645 B
C++

#ifndef LIGHT_H
#define LIGHT_H
#include <Eigen/Core>
class Light
{
public:
// Color (intensities)
Eigen::Vector3d I;
// https://stackoverflow.com/questions/461203/when-to-use-virtual-destructors
virtual ~Light() {};
// Given a query point return the direction _toward_ the Light.
//
// Input:
// q 3D query point in space
// Outputs:
// d 3D direction from point toward light as a vector.
// max_t parametric distance from q along d to light (may be inf)
virtual void direction(
const Eigen::Vector3d & q,
Eigen::Vector3d & d,
double & max_t) const =0;
};
#endif