54c9570800ddb9b5f67b6ddd0f421b0356760b04
1 #include "InfinitePlane.hxx"
3 InfinitePlane::InfinitePlane(const Vec3f
& a
, const Vec3f
& n
, Shader
* shader
)
11 InfinitePlane::~InfinitePlane()
16 InfinitePlane::Intersect(Ray
& ray
)
18 Vec3f diff
= m_a
- ray
.origin();
19 float t
= diff
.dot(m_n
) / ray
.direction().dot(m_n
);
20 if (t
< 1e-5 || t
> ray
.t())
27 InfinitePlane::GetNormal(Ray
& ray
)
29 // We already have the surface normal
This page took 0.041375 seconds and 3 git commands to generate.