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/PointLight.h
github-classroom[bot] 6eef377959
Initial commit
2024-10-11 10:27:35 +00:00

20 lines
536 B
C++

#ifndef POINTLIGHT_H
#define POINTLIGHT_H
#include "Light.h"
#include <Eigen/Core>
class PointLight : public Light
{
public:
Eigen::Vector3d p;
// 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)
void direction(
const Eigen::Vector3d & q, Eigen::Vector3d & d, double & max_t) const;
};
#endif