CMS 3D CMS Logo

Public Member Functions

ThreePlaneCrossing Class Reference

#include <ThreePlaneCrossing.h>

List of all members.

Public Member Functions

Plane::GlobalPoint crossing (const Plane &a, const Plane &b, const Plane &c) const

Detailed Description

Definition at line 6 of file ThreePlaneCrossing.h.


Member Function Documentation

Plane::GlobalPoint ThreePlaneCrossing::crossing ( const Plane a,
const Plane b,
const Plane c 
) const

Definition at line 5 of file ThreePlaneCrossing.cc.

References Plane::normalVector(), GloballyPositioned< T >::position(), query::result, and LinearEquation3< T >::solution().

{
  typedef Plane::Scalar    T;

  const GlobalVector n1g( a.normalVector());
  const GlobalVector n2g( b.normalVector());
  const GlobalVector n3g( c.normalVector());

  Basic3DVector<T> n1(n1g.basicVector());
  Basic3DVector<T> n2(n2g.basicVector());
  Basic3DVector<T> n3(n3g.basicVector());
  Basic3DVector<T> rhs( n1.dot( a.position().basicVector()),
                        n2.dot( b.position().basicVector()),
                        n3.dot( c.position().basicVector()));
  LinearEquation3<T> solver;
  Plane::GlobalPoint result( solver.solution( n1, n2, n3, rhs));
  return result;
}