mirror of
https://github.com/vonhyou/ray-tracer-comp371.git
synced 2025-06-08 07:22:01 +00:00
revert
This commit is contained in:
parent
22a96dce29
commit
f624514714
2 changed files with 1 additions and 14 deletions
|
@ -13,16 +13,4 @@ bool Sphere::intersect(const Ray &r) const {
|
||||||
return b * b - 4 * a * c >= 0;
|
return b * b - 4 * a * c >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Rectangle::intersect(const Ray &r) const {
|
bool Rectangle::intersect(const Ray &r) const { return false; }
|
||||||
Vector3f p1p2 = corners.col(1) - corners.col(0);
|
|
||||||
Vector3f p2p3 = corners.col(2) - corners.col(1);
|
|
||||||
Vector3f p3p1 = corners.col(0) - corners.col(2);
|
|
||||||
Vector3f p1p4 = corners.col(3) - corners.col(0);
|
|
||||||
Vector3f p4p3 = corners.col(2) - corners.col(3);
|
|
||||||
|
|
||||||
Vector3f n = -p1p2.cross(p2p3) / p1p2.cross(p2p3).norm();
|
|
||||||
|
|
||||||
if (n.dot(r.getOrigin() + r.getDirection()) == 0) {
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
#include "Ray.h"
|
#include "Ray.h"
|
||||||
|
|
||||||
#include <Eigen/Core>
|
#include <Eigen/Core>
|
||||||
#include <Eigen/src/Core/Matrix.h>
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
void RayTracer::parse() {
|
void RayTracer::parse() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue