mymesh.rays#

Ray casting and intersection tests

Intersection Tests#

RayTriangleIntersection(pt, ray, TriCoords)

Möller-Trumbore intersection algorithm to detect whether a ray intersects with a triangle.

RayTrianglesIntersection(pt, ray, Tris[, ...])

Vectorized Möller-Trumbore intersection algorithm to detect whether a ray intersects with a set of triangles.

RaysTrianglesIntersection(pts, rays, Tris[, ...])

Vectorized Möller-Trumbore intersection algorithm to detect intersections between a pairwise set of rays and a set of triangles.

RayBoxIntersection(pt, ray, xlim, ylim, zlim)

Intersection algorithm for detecting intersections between a ray and an axis-aligned box.

RayBoxesIntersection(pt, ray, xlims, ylims, ...)

Vectorized intersection algorithm for detecting intersections between a ray and a set of axis-aligned boxes.

PlaneBoxIntersection(pt, Normal, xlim, ylim, ...)

Intersection algorithm for detecting intersections between a plane and an axis-aligned box.

PlaneTriangleIntersection(pt, Normal, TriCoords)

Intersection test for detecting intersections between a plane and a triangle.

PlaneTrianglesIntersection(pt, Normal, Tris)

Vectorized intersection test for detecting intersections between a plane and a set of triangles.

TriangleTriangleIntersection(Tri1, Tri2[, ...])

Intersection test for two triangles.

TriangleTriangleIntersectionPt(Tri1, Tri2[, ...])

Intersection test for two triangles that returns the point(s) of intersection.

TrianglesTrianglesIntersection(Tri1s, Tri2s)

Vectorized intersection test for two sets of triangles.

TrianglesTrianglesIntersectionPts(Tri1s, Tri2s)

Vectorized intersection test for two sets of triangles that returns the intersection point(s) between each pair of triangles.

TriangleBoxIntersection(TriCoords, xlim, ...)

Intersection test for detecting intersections between a triangle and a box.

BoxTrianglesIntersection(Tris, xlim, ylim, zlim)

Intersection test for detecting intersections between a triangle and a box.

SegmentSegmentIntersection(s1, s2[, ...])

Detect intersections between two line segments.

SegmentsSegmentsIntersection(s1, s2[, ...])

Detect intersections between pairs of line segments.

RaySegmentIntersection(pt, ray, segment[, ...])

Detect intersections between a ray and a line segment.

RaySegmentsIntersection(pt, ray, segments[, ...])

Detect intersections between pairs of line segments.

RaySurfIntersection(pt, ray, NodeCoords, ...)

Identify intersections between a ray and a triangular surface mesh.

RaysSurfIntersection(pts, rays, NodeCoords, ...)

Identify intersections between rays and a triangular surface mesh.

RayOctreeIntersection(pt, ray, Octree)

Test for identifying intersections between a ray and an octree.

BoundaryBoundaryIntersection(NodeCoords1, ...)

Identify intersections between two surface meshes.

SurfSelfIntersection(NodeCoords, SurfConn[, ...])

Identify self intersections in a mesh

SurfSurfIntersection(NodeCoords1, SurfConn1, ...)

Identify intersections between two surface meshes.

PlaneSurfIntersection(pt, Normal, ...[, eps])

Inside/Outside Tests#

PointInBoundary(pt, NodeCoords, BoundaryConn)

Test to determine whether a point is inside a boundary mesh.

PointInSurf(pt, NodeCoords, SurfConn[, ...])

Test to determine whether a point is inside a surface mesh.

PointsInSurf(pts, NodeCoords, SurfConn[, ...])

Test to determine whether points are inside a surface mesh.

PointInBox(pt, xlim, ylim, zlim[, inclusive])

Test whether a point is inside a box

PointsInVoxel(pts, VoxelCoords, VoxelConn[, ...])

Test to determine whether points are inside a voxel mesh

PointInTri(Tri, pt[, method, eps, inclusive])

PointsInTris(Tris, pts[, method, eps, inclusive])