lib/ruby_on_rays/shapes/plane.rb
# Returns true if there is an intersection between the ray and the plane.
# @param ray [Ray3]
# @return [Boolean]
Returns true if there is an intersection between the ray and the plane.
Returns true if there is an intersection between the ray and the plane .
def intersection?(ray)
      b = ray.d.dot(n)
      return false if b == 0.0
      a = @p.sub(ray.o).dot(n)
      t = a / b
      t < ray.tmin || t > ray.tmax
    end
def intersection? ( ray ) b = ray . d . dot ( n ) return false if b == 0.0 a = @p . sub ( ray . o ) . dot ( n ) t = a / b t < ray . tmin || t > ray . tmax end
Returns true if there is an intersection between the ray and the plane.
Returns true if there is an intersection between the ray and the plane .
None
Boolean
ray
<not_specific>
<not_specific>
None