25 for(
int f=0; f<nFaces; f++)
73 K::Segment_3 query(K::Point_3(a[0], a[1], a[2]),
74 K::Point_3(b[0], b[1], b[2]));
75 return _tree->do_intersect(query);
83 K::Triangle_3 query(K::Point_3(a[0], a[1], a[2]),
84 K::Point_3(b[0], b[1], b[2]),
85 K::Point_3(c[0], c[1], c[2])
88 return _tree_2D->do_intersect(query);
90 return _tree->do_intersect(query);
97 int nIntersections = 0;
105 for(
int n=0; n<nCells; n++)
107 const Vec3D& a = meshCoords[cellNodes(n,0)];
108 const Vec3D& b = meshCoords[cellNodes(n,1)];
109 const Vec3D& c = meshCoords[cellNodes(n,2)];
115 else if (cellNodes.
getCount(n) == 4)
118 const Vec3D& d = meshCoords[cellNodes(n,3)];
131 const int nFaces = faces.
getCount();
132 for(
int n=0; n<nFaces; n++)
134 const Vec3D& a = meshCoords[faceNodes(n,0)];
135 const Vec3D& b = meshCoords[faceNodes(n,1)];
136 const Vec3D& c = meshCoords[faceNodes(n,2)];
142 else if (faceNodes.
getCount(n) == 4)
145 const Vec3D& d = meshCoords[faceNodes(n,3)];
153 return nIntersections;
160 K::Point_2 query(p[0], p[1]);
164 CGAL::Oriented_side orientation = line.oriented_side(query);
165 if (orientation == CGAL::ON_POSITIVE_SIDE)
167 else if (orientation == CGAL::ON_ORIENTED_BOUNDARY)
170 if (segment.has_on(query))
178 K::Point_3 query(p[0], p[1], p[2]);
182 CGAL::Oriented_side orientation = plane.oriented_side(query);
183 if (orientation == CGAL::ON_POSITIVE_SIDE)
185 else if (orientation == CGAL::ON_ORIENTED_BOUNDARY)
188 if (triangle.has_on(query))
const CRConnectivity & getAllFaceNodes() const
const FaceGroupList & getBoundaryFaceGroups() const
int getCount(const int i) const
shared_ptr< FaceGroup > FaceGroupPtr
std::vector< MyTriangle * > _triangles
bool hasIntersectionWithSegment(Vec3D a, Vec3D b)
int meshIntersections(const Mesh &mesh)
bool hasIntersectionWithTriangle(Vec3D a, Vec3D b, Vec3D c)
const CRConnectivity & getFaceNodes(const StorageSite &site) const
const Array< VecD3 > & getNodeCoordinates() const
K::Segment_2 getSegment2D() const
const StorageSite & getFaces() const
const StorageSite & getCells() const
int findOrientedSide(Vec3D p)
CGAL::AABB_tree< My_AABB_traits_2D > CGAL_Tree_2D
Triangle getTriangle() const
boost::shared_ptr< CGAL_Tree > _tree
boost::shared_ptr< CGAL_Tree_2D > _tree_2D
CGAL::AABB_tree< My_AABB_traits > CGAL_Tree
const CRConnectivity & getCellNodes() const