Interface Linecastable3D
- All Known Subinterfaces:
BoundarySource3D
,Mesh<F>
,TriangleMesh
- All Known Implementing Classes:
BoundaryList3D
,BoundarySourceLinecaster3D
,ConvexVolume
,Parallelepiped
,RegionBSPTree3D
,SimpleTriangleMesh
,Sphere
public interface Linecastable3D
Interface for objects that support linecast operations in Euclidean 3D space.
Linecasting is a process that takes a line or line convex subset and intersects it with the boundaries of a region. This is similar to raycasting used for collision detection with the exception that the intersecting element can be a line or line convex subset and not just a ray.
-
Method Summary
Modifier and TypeMethodDescriptiondefault List
<LinecastPoint3D> Intersect the given line against the boundaries in this instance, returning a list of all intersections in order of increasing distance along the line.linecast
(LineConvexSubset3D subset) Intersect the given line convex subset against the boundaries in this instance, returning a list of all intersections in order of increasing distance along the line.default LinecastPoint3D
linecastFirst
(Line3D line) Intersect the given line against the boundaries in this instance, returning the first intersection found when traveling in the direction of the line from infinity.linecastFirst
(LineConvexSubset3D subset) Intersect the given line convex subset against the boundaries in this instance, returning the first intersection found when traveling in the direction of the line subset from its start point.
-
Method Details
-
linecast
Intersect the given line against the boundaries in this instance, returning a list of all intersections in order of increasing distance along the line. An empty list is returned if no intersections are discovered.- Parameters:
line
- line the line to intersect- Returns:
- a list of computed intersections in order of increasing distance along the line
-
linecast
Intersect the given line convex subset against the boundaries in this instance, returning a list of all intersections in order of increasing distance along the line. An empty list is returned if no intersections are discovered.- Parameters:
subset
- line subset to intersect- Returns:
- a list of computed intersections in order of increasing distance along the line
-
linecastFirst
Intersect the given line against the boundaries in this instance, returning the first intersection found when traveling in the direction of the line from infinity.- Parameters:
line
- the line to intersect- Returns:
- the first intersection found or null if no intersection is found
-
linecastFirst
Intersect the given line convex subset against the boundaries in this instance, returning the first intersection found when traveling in the direction of the line subset from its start point.- Parameters:
subset
- line subset to intersect- Returns:
- the first intersection found or null if no intersection is found
-