I have an Infinite Plane and I know its Normal and Offset. Now, I want to know if a Ray Casting ray is intersecting with this Infinite Plane.
How can I know that?
Let the ray be described as a+λ∙b, i.e. starting at point a and going in direction b. Let the plane be described as n∙x=d, i.e. the set of points x which have the same offset d, measured in direction of n.
Now simply plug one into the other:
n∙(a+λ∙b) = d
n∙a+λ∙n∙b = d
λ∙n∙b = d − n∙a
λ = (d − n∙a)/(n∙b)
If the λ computed in this fashion is positive, then the ray will intersect the plane.