LibreCAD
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
lc::IntersectAgainstOthers Class Reference

calculate intersection points of many entities More...

#include <intersect.h>

Public Member Functions

 IntersectAgainstOthers (std::vector< entity::CADEntity_CSPtr >, std::vector< entity::CADEntity_CSPtr >, Intersect::Method, double tolerance)
 
std::vector< geo::Coordinateresult () const
 

Private Attributes

std::vector
< entity::CADEntity_CSPtr > 
_entities
 
std::vector
< entity::CADEntity_CSPtr > 
_others
 
const Intersect::Method _method
 
const double _tolerance
 

Detailed Description

calculate intersection points of many entities

Note
Can we make this into a general template ???
See also
Intersect

Definition at line 202 of file intersect.h.

Constructor & Destructor Documentation

IntersectAgainstOthers::IntersectAgainstOthers ( std::vector< entity::CADEntity_CSPtr >  entities,
std::vector< entity::CADEntity_CSPtr >  others,
Intersect::Method  method,
double  tolerance 
)

Definition at line 623 of file intersect.cpp.

626  :
627  _entities(entities), _others(others), _method(method), _tolerance(tolerance) {
628 }
std::vector< entity::CADEntity_CSPtr > _others
Definition: intersect.h:211
const Intersect::Method _method
Definition: intersect.h:212
std::vector< entity::CADEntity_CSPtr > _entities
Definition: intersect.h:210

Member Function Documentation

std::vector< geo::Coordinate > IntersectAgainstOthers::result ( ) const

Definition at line 630 of file intersect.cpp.

630  {
631 
632  Intersect intersect(_method, _tolerance);
633  /*FIXME unused
634  for (auto &other : _others) {
635  for (auto &entity : _entities) {
636  visitorDispatcher<bool, lc::GeoEntityVisitor>(intersect, *other.get(), *entity.get());
637  }
638  }
639  */
640  std::cerr << __PRETTY_FUNCTION__ << " requires implementation" << std::endl;
641 
642  return intersect.result();
643 }
calculate the intersection pojnts of 2 entities
Definition: intersect.h:35
const Intersect::Method _method
Definition: intersect.h:212

Member Data Documentation

std::vector<entity::CADEntity_CSPtr> lc::IntersectAgainstOthers::_entities
private

Definition at line 210 of file intersect.h.

const Intersect::Method lc::IntersectAgainstOthers::_method
private

Definition at line 212 of file intersect.h.

std::vector<entity::CADEntity_CSPtr> lc::IntersectAgainstOthers::_others
private

Definition at line 211 of file intersect.h.

const double lc::IntersectAgainstOthers::_tolerance
private

Definition at line 213 of file intersect.h.


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