Logo Search packages:      
Sourcecode: eigen3 version File versions  Download package

template<typename _Scalar, int _AmbientDim>
static Hyperplane Hyperplane< _Scalar, _AmbientDim >::Through ( const VectorType p0,
const VectorType p1,
const VectorType p2 
) [inline, static]

Constructs a hyperplane passing through the three points. The dimension of the ambient space is required to be exactly 3.

Definition at line 112 of file Hyperplane.h.

References Hyperplane< _Scalar, _AmbientDim >::normal().

  {
    EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(VectorType, 3)
    Hyperplane result(p0.size());
    result.normal() = (p2 - p0).cross(p1 - p0).normalized();
    result.offset() = -p0.dot(result.normal());
    return result;
  }

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index