Broad Phase¶
Broad Phase¶
- class ipctk.BroadPhase¶
Bases:
pybind11_objectPublic Data Attributes:
Function for determining if two vertices can collide.
Public Methods:
__init__(self)name(self)Get the name of the broad phase.
build(*args, **kwargs)Overloaded function.
clear(self)Clear any built data.
Find the candidate vertex-vertex collisions.
Find the candidate edge-vertex collisions.
Find the candidate edge-edge collisions.
Find the candidate face-vertex collisions.
Find the candidate edge-face intersections.
Find the candidate face-face collisions.
Detect all collision candidates needed for a given dimensional simulation.
Inherited from
pybind11_objectPrivate Methods:
-
__annotations__ =
{}¶
-
__module__ =
'ipctk'¶
- _pybind11_conduit_v1_()¶
- build(*args, **kwargs)¶
Overloaded function.
build(self: ipctk.BroadPhase, vertices: typing.Annotated[numpy.typing.NDArray[numpy.float64], “[m, n]”, “flags.f_contiguous”], edges: typing.Annotated[numpy.typing.NDArray[numpy.int32], “[m, n]”, “flags.f_contiguous”], faces: typing.Annotated[numpy.typing.NDArray[numpy.int32], “[m, n]”, “flags.f_contiguous”], inflation_radius: typing.SupportsFloat = 0) -> None
Build the broad phase for static collision detection.
- Parameters:
vertices: Vertex positions edges: Collision mesh edges faces: Collision mesh faces inflation_radius: Radius of inflation around all elements.
build(self: ipctk.BroadPhase, vertices_t0: typing.Annotated[numpy.typing.NDArray[numpy.float64], “[m, n]”, “flags.f_contiguous”], vertices_t1: typing.Annotated[numpy.typing.NDArray[numpy.float64], “[m, n]”, “flags.f_contiguous”], edges: typing.Annotated[numpy.typing.NDArray[numpy.int32], “[m, n]”, “flags.f_contiguous”], faces: typing.Annotated[numpy.typing.NDArray[numpy.int32], “[m, n]”, “flags.f_contiguous”], inflation_radius: typing.SupportsFloat = 0) -> None
Build the broad phase for continuous collision detection.
- Parameters:
vertices_t0: Starting vertices of the vertices. vertices_t1: Ending vertices of the vertices. edges: Collision mesh edges faces: Collision mesh faces inflation_radius: Radius of inflation around all elements.
- property can_vertices_collide : collections.abc.Callable[[SupportsInt, SupportsInt], bool]¶
Function for determining if two vertices can collide.
- detect_collision_candidates(self) ipc::Candidates¶
Detect all collision candidates needed for a given dimensional simulation.
- detect_edge_edge_candidates(self) list[ipc::EdgeEdgeCandidate]¶
Find the candidate edge-edge collisions.
- Returns:¶
The candidate edge-edge collisions.
- detect_edge_face_candidates(self) list[ipc::EdgeFaceCandidate]¶
Find the candidate edge-face intersections.
- Returns:¶
The candidate edge-face intersections.
- detect_edge_vertex_candidates(self) list[ipc::EdgeVertexCandidate]¶
Find the candidate edge-vertex collisions.
- Returns:¶
The candidate edge-vertex collisions.
- detect_face_face_candidates(self) list[ipc::FaceFaceCandidate]¶
Find the candidate face-face collisions.
- Returns:¶
The candidate face-face collisions.
- detect_face_vertex_candidates(self) list[ipc::FaceVertexCandidate]¶
Find the candidate face-vertex collisions.
- Returns:¶
The candidate face-vertex collisions.
-
__annotations__ =
Brute Force¶
- class ipctk.BruteForce¶
Bases:
BroadPhasePublic Data Attributes:
Inherited from
BroadPhaseFunction for determining if two vertices can collide.
Public Methods:
__init__(self)Inherited from
BroadPhase__init__(self)name(self)Get the name of the broad phase.
build(*args, **kwargs)Overloaded function.
clear(self)Clear any built data.
Find the candidate vertex-vertex collisions.
Find the candidate edge-vertex collisions.
Find the candidate edge-edge collisions.
Find the candidate face-vertex collisions.
Find the candidate edge-face intersections.
Find the candidate face-face collisions.
Detect all collision candidates needed for a given dimensional simulation.
Inherited from
pybind11_object
-
__annotations__ =
{}¶
-
__module__ =
'ipctk'¶
- _pybind11_conduit_v1_()¶
-
__annotations__ =
Hash Grid¶
- class ipctk.HashGrid¶
Bases:
BroadPhasePublic Data Attributes:
Inherited from
BroadPhaseFunction for determining if two vertices can collide.
Public Methods:
__init__(self)Inherited from
BroadPhase__init__(self)name(self)Get the name of the broad phase.
build(*args, **kwargs)Overloaded function.
clear(self)Clear any built data.
Find the candidate vertex-vertex collisions.
Find the candidate edge-vertex collisions.
Find the candidate edge-edge collisions.
Find the candidate face-vertex collisions.
Find the candidate edge-face intersections.
Find the candidate face-face collisions.
Detect all collision candidates needed for a given dimensional simulation.
Inherited from
pybind11_object
-
__annotations__ =
{}¶
-
__module__ =
'ipctk'¶
- _pybind11_conduit_v1_()¶
- property cell_size : float¶
- property domain_max : Annotated[numpy.typing.NDArray[numpy.float64], '[3, 1]']¶
- property domain_min : Annotated[numpy.typing.NDArray[numpy.float64], '[3, 1]']¶
- property grid_size : Annotated[numpy.typing.NDArray[numpy.int32], '[3, 1]']¶
-
__annotations__ =
Spatial Hash¶
- class ipctk.SpatialHash¶
Bases:
BroadPhasePublic Data Attributes:
Inherited from
BroadPhaseFunction for determining if two vertices can collide.
Public Methods:
__init__(self)build(*args, **kwargs)Overloaded function.
Inherited from
BroadPhase__init__(self)name(self)Get the name of the broad phase.
build(*args, **kwargs)Overloaded function.
clear(self)Clear any built data.
Find the candidate vertex-vertex collisions.
Find the candidate edge-vertex collisions.
Find the candidate edge-edge collisions.
Find the candidate face-vertex collisions.
Find the candidate edge-face intersections.
Find the candidate face-face collisions.
Detect all collision candidates needed for a given dimensional simulation.
Inherited from
pybind11_object
-
__annotations__ =
{}¶
-
__module__ =
'ipctk'¶
- _pybind11_conduit_v1_()¶
- build(*args, **kwargs)¶
Overloaded function.
build(self: ipctk.SpatialHash, vertices: typing.Annotated[numpy.typing.NDArray[numpy.float64], “[m, n]”, “flags.f_contiguous”], edges: typing.Annotated[numpy.typing.NDArray[numpy.int32], “[m, n]”, “flags.f_contiguous”], faces: typing.Annotated[numpy.typing.NDArray[numpy.int32], “[m, n]”, “flags.f_contiguous”], inflation_radius: typing.SupportsFloat = 0, voxel_size: typing.SupportsFloat = -1) -> None
build(self: ipctk.SpatialHash, vertices_t0: typing.Annotated[numpy.typing.NDArray[numpy.float64], “[m, n]”, “flags.f_contiguous”], vertices_t1: typing.Annotated[numpy.typing.NDArray[numpy.float64], “[m, n]”, “flags.f_contiguous”], edges: typing.Annotated[numpy.typing.NDArray[numpy.int32], “[m, n]”, “flags.f_contiguous”], faces: typing.Annotated[numpy.typing.NDArray[numpy.int32], “[m, n]”, “flags.f_contiguous”], inflation_radius: typing.SupportsFloat = 0, voxel_size: typing.SupportsFloat = -1) -> None
-
__annotations__ =
BVH¶
- class ipctk.BVH¶
Bases:
BroadPhasePublic Data Attributes:
Inherited from
BroadPhaseFunction for determining if two vertices can collide.
Public Methods:
__init__(self)Inherited from
BroadPhase__init__(self)name(self)Get the name of the broad phase.
build(*args, **kwargs)Overloaded function.
clear(self)Clear any built data.
Find the candidate vertex-vertex collisions.
Find the candidate edge-vertex collisions.
Find the candidate edge-edge collisions.
Find the candidate face-vertex collisions.
Find the candidate edge-face intersections.
Find the candidate face-face collisions.
Detect all collision candidates needed for a given dimensional simulation.
Inherited from
pybind11_object
-
__annotations__ =
{}¶
-
__module__ =
'ipctk'¶
- _pybind11_conduit_v1_()¶
-
__annotations__ =
LBVH¶
- class ipctk.LBVH¶
Bases:
BroadPhasePublic Data Attributes:
Inherited from
BroadPhaseFunction for determining if two vertices can collide.
Public Methods:
__init__(self)Inherited from
BroadPhase__init__(self)name(self)Get the name of the broad phase.
build(*args, **kwargs)Overloaded function.
clear(self)Clear any built data.
Find the candidate vertex-vertex collisions.
Find the candidate edge-vertex collisions.
Find the candidate edge-edge collisions.
Find the candidate face-vertex collisions.
Find the candidate edge-face intersections.
Find the candidate face-face collisions.
Detect all collision candidates needed for a given dimensional simulation.
Inherited from
pybind11_object
-
__annotations__ =
{}¶
-
__module__ =
'ipctk'¶
- _pybind11_conduit_v1_()¶
- property edge_nodes : list[ipctk.LBVH_Node]¶
- property face_nodes : list[ipctk.LBVH_Node]¶
- property vertex_nodes : list[ipctk.LBVH_Node]¶
-
__annotations__ =
Sweep and Prune¶
- class ipctk.SweepAndPrune¶
Bases:
BroadPhasePublic Data Attributes:
Inherited from
BroadPhaseFunction for determining if two vertices can collide.
Public Methods:
__init__(self)Inherited from
BroadPhase__init__(self)name(self)Get the name of the broad phase.
build(*args, **kwargs)Overloaded function.
clear(self)Clear any built data.
Find the candidate vertex-vertex collisions.
Find the candidate edge-vertex collisions.
Find the candidate edge-edge collisions.
Find the candidate face-vertex collisions.
Find the candidate edge-face intersections.
Find the candidate face-face collisions.
Detect all collision candidates needed for a given dimensional simulation.
Inherited from
pybind11_object
-
__annotations__ =
{}¶
-
__module__ =
'ipctk'¶
- _pybind11_conduit_v1_()¶
-
__annotations__ =
Sweep and Tiniest Queue¶
AABB¶
- class ipctk.AABB¶
Bases:
pybind11_objectPublic Data Attributes:
Minimum corner of the AABB.
Maximum corner of the AABB.
Vertex IDs attached to the AABB.
Public Methods:
__init__(*args, **kwargs)Overloaded function.
from_point(*args, **kwargs)Overloaded function.
intersects(self, other)Check if another AABB intersects with this one.
__repr__(self)__str__(self)conservative_inflation(min, max, ...)Compute a conservative inflation of the AABB.
Inherited from
pybind11_objectPrivate Methods:
-
__annotations__ =
{}¶
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: ipctk.AABB) -> None
__init__(self: ipctk.AABB, min: typing.Annotated[numpy.typing.NDArray[numpy.float64], “[m, 1]”], max: typing.Annotated[numpy.typing.NDArray[numpy.float64], “[m, 1]”]) -> None
__init__(self: ipctk.AABB, aabb1: ipctk.AABB, aabb2: ipctk.AABB) -> None
__init__(self: ipctk.AABB, aabb1: ipctk.AABB, aabb2: ipctk.AABB, aabb3: ipctk.AABB) -> None
-
__module__ =
'ipctk'¶
- _pybind11_conduit_v1_()¶
- static conservative_inflation(min: Annotated[numpy.typing.ArrayLike, numpy.float64, '[m, 1]'], max: Annotated[numpy.typing.ArrayLike, numpy.float64, '[m, 1]'], inflation_radius: SupportsFloat) tuple[Annotated[numpy.typing.NDArray[numpy.float64], '[m, 1]'], Annotated[numpy.typing.NDArray[numpy.float64], '[m, 1]']]¶
Compute a conservative inflation of the AABB.
- static from_point(*args, **kwargs)¶
Overloaded function.
from_point(p: typing.Annotated[numpy.typing.NDArray[numpy.float64], “[m, 1]”], inflation_radius: typing.SupportsFloat = 0) -> ipctk.AABB
Construct an AABB for a static point.
- Parameters:
p: The point’s position. inflation_radius: Radius of a sphere around the point which the AABB encloses.
- Returns:
The constructed AABB.
from_point(p_t0: typing.Annotated[numpy.typing.NDArray[numpy.float64], “[m, 1]”], p_t1: typing.Annotated[numpy.typing.NDArray[numpy.float64], “[m, 1]”], inflation_radius: typing.SupportsFloat = 0) -> ipctk.AABB
Construct an AABB for a moving point (i.e. temporal edge).
- Parameters:
p_t0: The point’s position at time t=0. p_t1: The point’s position at time t=1. inflation_radius: Radius of a capsule around the temporal edge which the AABB encloses.
- Returns:
The constructed AABB.
- intersects(self, other: ipctk.AABB) bool¶
Check if another AABB intersects with this one.
- Parameters:¶
- other: ipctk.AABB¶
The other AABB.
- Returns:¶
If the two AABBs intersect.
- property max : Annotated[numpy.typing.NDArray[numpy.float64], '[3, 1]']¶
Maximum corner of the AABB.
- property min : Annotated[numpy.typing.NDArray[numpy.float64], '[3, 1]']¶
Minimum corner of the AABB.
- property vertex_ids : Annotated[list[int], 'FixedSize(3)']¶
Vertex IDs attached to the AABB.
-
__annotations__ =