Added 'intersect' method returning intersection envelope.

This commit is contained in:
Artem Pavlenko 2007-10-21 09:51:03 +00:00
parent 4018c728de
commit b79b3a89ec

View file

@ -52,10 +52,13 @@ bool (Envelope<double>::*contains_p1)(double,double) const = &Envelope<double>::
bool (Envelope<double>::*contains_p2)(coord<double,2> const&) const = &Envelope<double>::contains; bool (Envelope<double>::*contains_p2)(coord<double,2> const&) const = &Envelope<double>::contains;
bool (Envelope<double>::*contains_p3)(Envelope<double> const&) const = &Envelope<double>::contains; bool (Envelope<double>::*contains_p3)(Envelope<double> const&) const = &Envelope<double>::contains;
//intersects
bool (Envelope<double>::*intersects_p1)(double,double) const = &Envelope<double>::intersects; bool (Envelope<double>::*intersects_p1)(double,double) const = &Envelope<double>::intersects;
bool (Envelope<double>::*intersects_p2)(coord<double,2> const&) const = &Envelope<double>::intersects; bool (Envelope<double>::*intersects_p2)(coord<double,2> const&) const = &Envelope<double>::intersects;
bool (Envelope<double>::*intersects_p3)(Envelope<double> const&) const = &Envelope<double>::intersects; bool (Envelope<double>::*intersects_p3)(Envelope<double> const&) const = &Envelope<double>::intersects;
// intersect
Envelope<double> (Envelope<double>::*intersect)(Envelope<double> const&) const = &Envelope<double>::intersect;
void export_envelope() void export_envelope()
{ {
@ -85,6 +88,7 @@ void export_envelope()
.def("intersects",intersects_p1) .def("intersects",intersects_p1)
.def("intersects",intersects_p2) .def("intersects",intersects_p2)
.def("intersects",intersects_p3) .def("intersects",intersects_p3)
.def("intersect",intersect)
.def(self == self) // __eq__ .def(self == self) // __eq__
.def(self + self) // __add__ .def(self + self) // __add__
.def(self - self) // __sub__ .def(self - self) // __sub__