//********************************************************************** // // * Find the intersection of this plane and a line defined by a direction // and a point on the line. Return true if the line intersects the plane and // return the point of intersection through the reference parameter, // otherwise return false. // //====================================================================== bool SJCPlane:: Intersect(const SJCVector3f& point, const SJCVector3f& direction, SJCVector3f& intersection) const //======================================================================i { if (IsParallel(direction)) return false; else { intersection = point + direction * -( (m_normal * point) + m_distance) / (m_normal * direction); return true; }// else }// Intersect
bool PlaneGeometry::IsOnPlane( const PlaneGeometry *plane ) const { return ( IsParallel( plane ) && (Distance( plane->GetOrigin() ) < eps) ); }
bool Plane::Equals(const Plane &other, float epsilon) const { return IsParallel(other, epsilon) && EqualAbs(d, other.d, epsilon); }