intersect
line_plane_intersect(plane, point, vector, eps=1e-12, return_t=False)
Vectorized intersection of multiple line-plane pairs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plane
|
Tensor
|
shape [N, 4] plane coefficients (a, b, c, d) in the form ax + by + cz + d = 0. Alternatively, shape [N, 6] representing the plane in point-normal where the first three columns are the point coordinates (x, y, z) and the last three columns are the normal vector components (nx, ny, nz). |
required |
point
|
Tensor
|
shape [N, 3] representing the points (x, y, z) of the lines. |
required |
vector
|
Tensor
|
shape [N, 3] representing the direction vectors (dx, dy, dz) of the lines. |
required |
eps
|
float
|
tolerance to avoid division by zero. Defaults to 1e-12. |
1e-12
|
return_t
|
bool
|
If True, also return line parameters |
False
|
Returns:
| Type | Description |
|---|---|
Tensor | tuple[Tensor, Tensor]
|
If |
Source code in src/torch_structure/geometry/intersect.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |