CMS 3D CMS Logo

List of all members | Public Member Functions
ThreePlaneCrossing Class Reference

#include <ThreePlaneCrossing.h>

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 PV3DBase< T, PVType, FrameType >::basicVector(), Plane::normalVector(), GloballyPositioned< T >::position(), mps_fire::result, and LinearEquation3< T >::solution().

Referenced by NavVolume6Faces::computeBounds().

7 {
8  typedef Plane::Scalar T;
9 
10  const GlobalVector n1g( a.normalVector());
11  const GlobalVector n2g( b.normalVector());
12  const GlobalVector n3g( c.normalVector());
13 
14  Basic3DVector<T> n1(n1g.basicVector());
15  Basic3DVector<T> n2(n2g.basicVector());
16  Basic3DVector<T> n3(n3g.basicVector());
17  Basic3DVector<T> rhs( n1.dot( a.position().basicVector()),
18  n2.dot( b.position().basicVector()),
19  n3.dot( c.position().basicVector()));
20  LinearEquation3<T> solver;
21  Plane::GlobalPoint result( solver.solution( n1, n2, n3, rhs));
22  return result;
23 }
Basic3DVector< T > solution(const Basic3DVector< T > &row0, const Basic3DVector< T > &row1, const Basic3DVector< T > &row2, const Basic3DVector< T > &rhsvec) const
GlobalVector normalVector() const
Definition: Plane.h:41
long double T
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
const PositionType & position() const