shape_doc 0.1
intersection2d_factory< C, V > Class Template Reference

#include <cell2d_list.hpp>

List of all members.

Public Types

Public Member Functions

Static Public Member Functions


Detailed Description

template<class C, class V>
class mmx::shape::intersection2d_factory< C, V >

Definition at line 103 of file cell2d_list.hpp.


Member Typedef Documentation

typedef bounding_box<C,V> BoundingBox

Definition at line 105 of file cell2d_list.hpp.

typedef cell2d<C,V>::Point Point

Definition at line 106 of file cell2d_list.hpp.


Member Function Documentation

void compute ( Seq< Point * > &  res,
geometric< V > *  c1,
geometric< V > *  c2,
const BoundingBox bx 
) [inline]

Definition at line 115 of file cell2d_list.hpp.

References Cell2dAlgebraicCurve, and mmx::shape::intersection().

                                                                                {
    
    if(Cell2dAlgebraicCurve * ca1 = dynamic_cast<Cell2dAlgebraicCurve *>(c1)) {
      if(Cell2dAlgebraicCurve * ca2 = dynamic_cast<Cell2dAlgebraicCurve *>(c2)) {

        typedef polynomial< double, with<Bernstein> > MultivariateDenseBernstein;
        MultivariateDenseBernstein p1, p2;
        let::assign(p1.rep(), ca1->m_polynomial.rep() );
        let::assign(p2.rep(), ca2->m_polynomial.rep() );
        Solver::intersection(res, p1, p2, bx);
      }
    }
  }
static intersection2d_factory<C,V>* instance ( void  ) [inline, static]

Definition at line 107 of file cell2d_list.hpp.

References Intersection2dFactory.

                                                {

        if(!m_instance)
            m_instance = new Intersection2dFactory ;

        return m_instance ;
    }

The documentation for this class was generated from the following file: