Continuous Collision Detection¶
- ipctk.is_step_collision_free(mesh: ipctk.CollisionMesh, vertices_t0: numpy.ndarray[numpy.float64[m, n]], vertices_t1: numpy.ndarray[numpy.float64[m, n]], broad_phase_method: ipctk.BroadPhaseMethod = <BroadPhaseMethod.HASH_GRID: 1>, min_distance: float = 0.0, tolerance: float = 1e-06, max_iterations: int = 10000000) bool ¶
Determine if the step is collision free.
Note
Assumes the trajectory is linear.
- Parameters:¶
- mesh
The collision mesh.
- vertices_t0
Surface vertex vertices at start as rows of a matrix.
- vertices_t1
Surface vertex vertices at end as rows of a matrix.
- broad_phase_method
The broad phase method to use.
- min_distance
The minimum distance allowable between any two elements.
- tolerance
The tolerance for the CCD algorithm.
- max_iterations
The maximum number of iterations for the CCD algorithm.
- Returns:¶
True if <b>any</b> collisions occur.
- ipctk.compute_collision_free_stepsize(mesh: ipctk.CollisionMesh, vertices_t0: numpy.ndarray[numpy.float64[m, n]], vertices_t1: numpy.ndarray[numpy.float64[m, n]], broad_phase_method: ipctk.BroadPhaseMethod = <BroadPhaseMethod.HASH_GRID: 1>, min_distance: float = 0.0, tolerance: float = 1e-06, max_iterations: int = 10000000) float ¶
Computes a maximal step size that is collision free.
Note
Assumes the trajectory is linear.
- Parameters:¶
- mesh
The collision mesh.
- vertices_t0
Vertex vertices at start as rows of a matrix. Assumes vertices_t0 is intersection free.
- vertices_t1
Surface vertex vertices at end as rows of a matrix.
- broad_phase_method
The broad phase method to use.
- min_distance
The minimum distance allowable between any two elements.
- tolerance
The tolerance for the CCD algorithm.
- max_iterations
The maximum number of iterations for the CCD algorithm.
- Returns:¶
A step-size $in [0, 1]$ that is collision free. A value of 1.0 if a full step and 0.0 is no step.
-
ipctk.point_point_ccd(p0_t0: numpy.ndarray[numpy.float64[3, 1]], p1_t0: numpy.ndarray[numpy.float64[3, 1]], p0_t1: numpy.ndarray[numpy.float64[3, 1]], p1_t1: numpy.ndarray[numpy.float64[3, 1]], min_distance: float =
0.0
, tmax: float =1.0
, tolerance: float =1e-06
, max_iterations: int =10000000
, conservative_rescaling: float =0.8
) tuple[bool, float] ¶
-
ipctk.point_edge_ccd(p_t0: numpy.ndarray[numpy.float64[m, 1]], e0_t0: numpy.ndarray[numpy.float64[m, 1]], e1_t0: numpy.ndarray[numpy.float64[m, 1]], p_t1: numpy.ndarray[numpy.float64[m, 1]], e0_t1: numpy.ndarray[numpy.float64[m, 1]], e1_t1: numpy.ndarray[numpy.float64[m, 1]], min_distance: float =
0.0
, tmax: float =1.0
, tolerance: float =1e-06
, max_iterations: int =10000000
, conservative_rescaling: float =0.8
) tuple[bool, float] ¶
-
ipctk.edge_edge_ccd(ea0_t0: numpy.ndarray[numpy.float64[3, 1]], ea1_t0: numpy.ndarray[numpy.float64[3, 1]], eb0_t0: numpy.ndarray[numpy.float64[3, 1]], eb1_t0: numpy.ndarray[numpy.float64[3, 1]], ea0_t1: numpy.ndarray[numpy.float64[3, 1]], ea1_t1: numpy.ndarray[numpy.float64[3, 1]], eb0_t1: numpy.ndarray[numpy.float64[3, 1]], eb1_t1: numpy.ndarray[numpy.float64[3, 1]], min_distance: float =
0.0
, tmax: float =1.0
, tolerance: float =1e-06
, max_iterations: int =10000000
, conservative_rescaling: float =0.8
) tuple[bool, float] ¶
-
ipctk.point_triangle_ccd(p_t0: numpy.ndarray[numpy.float64[3, 1]], t0_t0: numpy.ndarray[numpy.float64[3, 1]], t1_t0: numpy.ndarray[numpy.float64[3, 1]], t2_t0: numpy.ndarray[numpy.float64[3, 1]], p_t1: numpy.ndarray[numpy.float64[3, 1]], t0_t1: numpy.ndarray[numpy.float64[3, 1]], t1_t1: numpy.ndarray[numpy.float64[3, 1]], t2_t1: numpy.ndarray[numpy.float64[3, 1]], min_distance: float =
0.0
, tmax: float =1.0
, tolerance: float =1e-06
, max_iterations: int =10000000
, conservative_rescaling: float =0.8
) tuple[bool, float] ¶