CollisionPredicates¶
-
class
dolfin.cpp.mesh.
CollisionPredicates
¶ Bases:
object
This class implements algorithms for detecting pairwise collisions between mesh entities of varying dimensions.
-
static
collides
(*args) → bool¶ Check whether two entities collide. Arguments entity_0 (
MeshEntity
) The first entity. entity_1 (MeshEntity
) The second entity. Returns bool True iff entity collides with cell.Parameters: - MeshEntity & entity_0 (const) –
- MeshEntity & entity_1 (const) –
Return type:
-
static
collides_segment_point
()¶ Check whether segment p0-p1 collides with point.
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & point (const) –
- gdim (std::size_t) –
Return type:
-
static
collides_segment_point_1d
()¶ Check whether segment p0-p1 collides with point (1D version)
Parameters: - p0 (double) –
- p1 (double) –
- point (double) –
Return type:
-
static
collides_segment_point_2d
(p0: dolfin.cpp.mesh.Point, p1: dolfin.cpp.mesh.Point, point: dolfin.cpp.mesh.Point) → bool¶ Check whether segment p0-p1 collides with point (2D version)
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & point (const) –
Return type:
-
static
collides_segment_point_3d
(p0: dolfin.cpp.mesh.Point, p1: dolfin.cpp.mesh.Point, point: dolfin.cpp.mesh.Point) → bool¶ Check whether segment p0-p1 collides with point (3D version)
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & point (const) –
Return type:
-
static
collides_segment_segment
()¶ Check whether segment p0-p1 collides with segment q0-q1.
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & q0 (const) –
- Point & q1 (const) –
- gdim (std::size_t) –
Return type:
-
static
collides_segment_segment_1d
()¶ Check whether segment p0-p1 collides with segment q0-q1 (1D version)
Parameters: - p0 (double) –
- p1 (double) –
- q0 (double) –
- q1 (double) –
Return type:
-
static
collides_segment_segment_2d
(p0: dolfin.cpp.mesh.Point, p1: dolfin.cpp.mesh.Point, q0: dolfin.cpp.mesh.Point, q1: dolfin.cpp.mesh.Point) → bool¶ Check whether segment p0-p1 collides with segment q0-q1 (2D version)
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & q0 (const) –
- Point & q1 (const) –
Return type:
-
static
collides_segment_segment_3d
(p0: dolfin.cpp.mesh.Point, p1: dolfin.cpp.mesh.Point, q0: dolfin.cpp.mesh.Point, q1: dolfin.cpp.mesh.Point) → bool¶ Check whether segment p0-p1 collides with segment q0-q1 (3D version)
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & q0 (const) –
- Point & q1 (const) –
Return type:
-
static
collides_tetrahedron_point_3d
(p0: dolfin.cpp.mesh.Point, p1: dolfin.cpp.mesh.Point, p2: dolfin.cpp.mesh.Point, p3: dolfin.cpp.mesh.Point, point: dolfin.cpp.mesh.Point) → bool¶ Check whether tetrahedron p0-p1-p2-p3 collides with point.
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & p2 (const) –
- Point & p3 (const) –
- Point & point (const) –
Return type:
-
static
collides_tetrahedron_segment_3d
(p0: dolfin.cpp.mesh.Point, p1: dolfin.cpp.mesh.Point, p2: dolfin.cpp.mesh.Point, p3: dolfin.cpp.mesh.Point, q0: dolfin.cpp.mesh.Point, q1: dolfin.cpp.mesh.Point) → bool¶ Check whether tetrahedron p0-p1-p2-p3 collides with segment q0-q1.
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & p2 (const) –
- Point & p3 (const) –
- Point & q0 (const) –
- Point & q1 (const) –
Return type:
-
static
collides_tetrahedron_tetrahedron_3d
(p0: dolfin.cpp.mesh.Point, p1: dolfin.cpp.mesh.Point, p2: dolfin.cpp.mesh.Point, p3: dolfin.cpp.mesh.Point, q0: dolfin.cpp.mesh.Point, q1: dolfin.cpp.mesh.Point, q2: dolfin.cpp.mesh.Point, q3: dolfin.cpp.mesh.Point) → bool¶ Check whether tetrahedron p0-p1-p2-p3 collides with tetrahedron q0-q1-q2.
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & p2 (const) –
- Point & p3 (const) –
- Point & q0 (const) –
- Point & q1 (const) –
- Point & q2 (const) –
- Point & q3 (const) –
Return type:
-
static
collides_tetrahedron_triangle_3d
(p0: dolfin.cpp.mesh.Point, p1: dolfin.cpp.mesh.Point, p2: dolfin.cpp.mesh.Point, p3: dolfin.cpp.mesh.Point, q0: dolfin.cpp.mesh.Point, q1: dolfin.cpp.mesh.Point, q2: dolfin.cpp.mesh.Point) → bool¶ Check whether tetrahedron p0-p1-p2-p3 collides with triangle q0-q1-q2.
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & p2 (const) –
- Point & p3 (const) –
- Point & q0 (const) –
- Point & q1 (const) –
- Point & q2 (const) –
Return type:
-
static
collides_triangle_point
()¶ Check whether triangle p0-p1-p2 collides with point.
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & p2 (const) –
- Point & point (const) –
- gdim (std::size_t) –
Return type:
-
static
collides_triangle_point_2d
(p0: dolfin.cpp.mesh.Point, p1: dolfin.cpp.mesh.Point, p2: dolfin.cpp.mesh.Point, point: dolfin.cpp.mesh.Point) → bool¶ Check whether triangle p0-p1-p2 collides with point (2D version)
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & p2 (const) –
- Point & point (const) –
Return type:
-
static
collides_triangle_point_3d
(p0: dolfin.cpp.mesh.Point, p1: dolfin.cpp.mesh.Point, p2: dolfin.cpp.mesh.Point, point: dolfin.cpp.mesh.Point) → bool¶ Check whether triangle p0-p1-p2 collides with point (3D version)
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & p2 (const) –
- Point & point (const) –
Return type:
-
static
collides_triangle_segment
()¶ Check whether triangle p0-p1-p2 collides with segment q0-q1.
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & p2 (const) –
- Point & q0 (const) –
- Point & q1 (const) –
- gdim (std::size_t) –
Return type:
-
static
collides_triangle_segment_2d
(p0: dolfin.cpp.mesh.Point, p1: dolfin.cpp.mesh.Point, p2: dolfin.cpp.mesh.Point, q0: dolfin.cpp.mesh.Point, q1: dolfin.cpp.mesh.Point) → bool¶ Check whether triangle p0-p1-p2 collides with segment q0-q1 (2D version)
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & p2 (const) –
- Point & q0 (const) –
- Point & q1 (const) –
Return type:
-
static
collides_triangle_segment_3d
(p0: dolfin.cpp.mesh.Point, p1: dolfin.cpp.mesh.Point, p2: dolfin.cpp.mesh.Point, q0: dolfin.cpp.mesh.Point, q1: dolfin.cpp.mesh.Point) → bool¶ Check whether triangle p0-p1-p2 collides with segment q0-q1 (3D version)
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & p2 (const) –
- Point & q0 (const) –
- Point & q1 (const) –
Return type:
-
static
collides_triangle_triangle
()¶ Check whether triangle p0-p1-p2 collides with triangle q0-q1-q2.
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & p2 (const) –
- Point & q0 (const) –
- Point & q1 (const) –
- Point & q2 (const) –
- gdim (std::size_t) –
Return type:
-
static
collides_triangle_triangle_2d
(p0: dolfin.cpp.mesh.Point, p1: dolfin.cpp.mesh.Point, p2: dolfin.cpp.mesh.Point, q0: dolfin.cpp.mesh.Point, q1: dolfin.cpp.mesh.Point, q2: dolfin.cpp.mesh.Point) → bool¶ Check whether triangle p0-p1-p2 collides with triangle q0-q1-q2 (2D version)
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & p2 (const) –
- Point & q0 (const) –
- Point & q1 (const) –
- Point & q2 (const) –
Return type:
-
static
collides_triangle_triangle_3d
(p0: dolfin.cpp.mesh.Point, p1: dolfin.cpp.mesh.Point, p2: dolfin.cpp.mesh.Point, q0: dolfin.cpp.mesh.Point, q1: dolfin.cpp.mesh.Point, q2: dolfin.cpp.mesh.Point) → bool¶ Check whether triangle p0-p1-p2 collides with triangle q0-q1-q2 (3D version)
Parameters: - Point & p0 (const) –
- Point & p1 (const) –
- Point & p2 (const) –
- Point & q0 (const) –
- Point & q1 (const) –
- Point & q2 (const) –
Return type:
-
thisown
¶ The membership flag
-
static