Memosa-FVM
0.2
|
#include <AABB.h>
Classes | |
struct | MySegmentPrimitive |
struct | MyTriangle |
struct | MyTrianglePrimitive |
Public Types | |
typedef Vector< double, 3 > | Vec3D |
Public Member Functions | |
AABB (const Mesh &mesh) | |
bool | hasIntersectionWithSegment (Vec3D a, Vec3D b) |
bool | hasIntersectionWithTriangle (Vec3D a, Vec3D b, Vec3D c) |
int | meshIntersections (const Mesh &mesh) |
int | findOrientedSide (Vec3D p) |
Private Types | |
typedef CGAL::Simple_cartesian < double > | K |
typedef K::Point_3 | Point |
typedef K::Point_2 | Point2D |
typedef K::Triangle_3 | Triangle |
typedef K::Plane_3 | Plane |
typedef K::Line_2 | Line2D |
typedef std::vector < MyTriangle * > ::const_iterator | MyTriangleIterator |
typedef CGAL::AABB_traits< K, MyTrianglePrimitive > | My_AABB_traits |
typedef CGAL::AABB_tree < My_AABB_traits > | CGAL_Tree |
typedef CGAL::AABB_traits< K, MySegmentPrimitive > | My_AABB_traits_2D |
typedef CGAL::AABB_tree < My_AABB_traits_2D > | CGAL_Tree_2D |
Private Attributes | |
bool | _is2D |
std::vector< MyTriangle * > | _triangles |
boost::shared_ptr< CGAL_Tree > | _tree |
boost::shared_ptr< CGAL_Tree_2D > | _tree_2D |
A wrapper for CGAL's axis aligned bounding box concept. We use this to compute intersections of the fluid mesh with the boundary mesh representing the solid. The tree is constructed with the faces of the latter and then we go through all the faces of the fluid mesh to find the ones that have intersections with any of the tree faces.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
typedef Vector<double,3> AABB::Vec3D |
AABB::AABB | ( | const Mesh & | mesh | ) |
Definition at line 10 of file AABB.cpp.
References _is2D, _tree, _tree_2D, _triangles, Mesh::getBoundaryFaceGroups(), StorageSite::getCount(), CRConnectivity::getCount(), Mesh::getDimension(), Mesh::getFaceNodes(), Mesh::getNodeCoordinates(), and FaceGroup::site.
int AABB::findOrientedSide | ( | AABB::Vec3D | p | ) |
locate the side on which a given point lies. returns 0 if the point is on one of the faces of the tree, -1 if it's inside and 1 if it is outside. This check is only meaningful if the faces of the tree form a closed surface.
Definition at line 156 of file AABB.cpp.
References _is2D, _triangles, AABB::MyTriangle::getLine2D(), AABB::MyTriangle::getPlane(), AABB::MyTriangle::getSegment2D(), and AABB::MyTriangle::getTriangle().
bool AABB::hasIntersectionWithSegment | ( | AABB::Vec3D | a, |
AABB::Vec3D | b | ||
) |
bool AABB::hasIntersectionWithTriangle | ( | AABB::Vec3D | a, |
AABB::Vec3D | b, | ||
AABB::Vec3D | c | ||
) |
check whether a triangle defined by the three points a, b and c has any intersections with the faces of the tree
Definition at line 81 of file AABB.cpp.
References _is2D, _tree, and _tree_2D.
Referenced by IBManager::markIntersections(), and meshIntersections().
int AABB::meshIntersections | ( | const Mesh & | mesh | ) |
Definition at line 94 of file AABB.cpp.
References _is2D, Mesh::getAllFaceNodes(), Mesh::getCellNodes(), Mesh::getCells(), StorageSite::getCount(), CRConnectivity::getCount(), Mesh::getFaces(), Mesh::getNodeCoordinates(), StorageSite::getSelfCount(), and hasIntersectionWithTriangle().
|
private |
Definition at line 260 of file AABB.h.
Referenced by AABB(), findOrientedSide(), hasIntersectionWithSegment(), hasIntersectionWithTriangle(), and meshIntersections().
|
private |
Definition at line 262 of file AABB.h.
Referenced by AABB(), hasIntersectionWithSegment(), and hasIntersectionWithTriangle().
|
private |
Definition at line 263 of file AABB.h.
Referenced by AABB(), and hasIntersectionWithTriangle().
|
private |
Definition at line 261 of file AABB.h.
Referenced by AABB(), and findOrientedSide().