Intersection


object Intersection


Contains functions for intersection of ink geometry classes. For Kotlin callers, these are available as extension functions on the geometry classes themselves.

Summary

Public functions

Boolean

Returns true when the point (a Vec) intersects with a Box.

Boolean

Returns true when a Segment intersects with a Box --- when this segment has at least one point in common with the Box's interior, edges, or vertices

Boolean

Returns true when a Triangle intersects with a Box --- When this triangle has at least one point in common with the Box's interior, edges, or vertices.

Boolean

Returns true when a Parallelogram intersects with a Box --- When the box has at least one point in common with the Parallelogram's interior, edges, or vertices.

Boolean
Box.intersects(other: Box)

Returns true when a Box intersects with other --- When it has at least one point in common with other's interior, edges, or vertices.

Boolean

Returns true when a Parallelogram intersects with other --- When it has at least one point in common with other's interior, edges, or vertices.

Boolean

Returns true when a Segment intersects with another Segment --- when this segment has at least one point (including the start and end points) in common with another Segment.

Boolean

Returns true when a Triangle intersects with other --- When this triangle has at least one point in common with other's interior, edges, or vertices.

Boolean
Vec.intersects(other: Vec)

Returns true if the point (a Vec), intersects other; this only occurs when the two points are equal.

Boolean
Vec.intersects(parallelogram: Parallelogram)

Returns true when the point (a Vec) intersects with a Parallelogram.

Boolean

Returns true when a Segment intersects with a Parallelogram --- when this segment has at least one point in common with the Parallelogram's interior, edges, or vertices.

Boolean

Returns true when a Triangle intersects with a Parallelogram --- When this triangle has at least one point in common with the Parallelogram's interior, edges, or vertices.

Boolean
Box.intersects(parallelogram: Parallelogram)

Returns true when a Box intersects with a Parallelogram --- When it has at least one point in common with the Parallelogram's interior, edges, or vertices.

Boolean

Returns true when the Segment intersects with a point (a Vec).

Boolean

Returns true when the Triangle intersects with a point (a Vec).

Boolean

Returns true when the Parallelogram intersects with a point (a Vec).

Boolean
Box.intersects(point: Vec)

Returns true when the Box intersects with a point (a Vec).

Boolean

Returns true when the point (a Vec) intersects with a Segment.

Boolean

Returns true when a Triangle intersects with a Segment --- when the segment has at least one point in common with the Triangle's interior, edges, or vertices.

Boolean

Returns true when a Parallelogram intersects with a Segment --- when the segment has at least one point in common with the Parallelogram's interior, edges, or vertices.

Boolean

Returns true when a Box intersects with a Segment --- when the segment has at least one point in common with the Box's interior, edges, or vertices

Boolean
Vec.intersects(triangle: Triangle)

Returns true when the point (a Vec) intersects with a Triangle.

Boolean

Returns true when a Segment intersects with a Triangle --- when this segment has at least one point in common with the Triangle's interior, edges, or vertices.

Boolean

Returns true when a Parallelogram intersects with a Triangle --- When the triangle has at least one point in common with the Parallelogram's interior, edges, or vertices.

Boolean
Box.intersects(triangle: Triangle)

Returns true when a Box intersects with a Triangle --- When the triangle has at least one point in common with the Box's interior, edges, or vertices.

Boolean

Returns true when a PartitionedMesh intersects with a Box.

Boolean

Returns true when a Box intersects with a PartitionedMesh.

Boolean
Parallelogram.intersects(
    mesh: PartitionedMesh,
    meshToParallelogram: AffineTransform
)

RReturns true when a Parallelogram intersects with a PartitionedMesh.

Boolean

Returns true when the point (a Vec) intersects with mesh.

Boolean
Segment.intersects(
    mesh: PartitionedMesh,
    meshToSegment: AffineTransform
)

Returns true when a Segment intersects with a PartitionedMesh.

Boolean
Triangle.intersects(
    mesh: PartitionedMesh,
    meshToTriangle: AffineTransform
)

Returns true when a Triangle intersects with a PartitionedMesh.

Boolean
PartitionedMesh.intersects(
    parallelogram: Parallelogram,
    meshToParallelogram: AffineTransform
)

Returns true when a PartitionedMesh intersects with a Parallelogram.

Boolean

Returns true when the PartitionedMesh intersects with point.

Boolean
PartitionedMesh.intersects(
    segment: Segment,
    meshToSegment: AffineTransform
)

Returns true when a PartitionedMesh intersects with a Segment.

Boolean
PartitionedMesh.intersects(
    triangle: Triangle,
    meshToTriangle: AffineTransform
)

Returns true when a PartitionedMesh intersects with a Triangle.

Boolean
PartitionedMesh.intersects(
    other: PartitionedMesh,
    thisToCommonTransForm: AffineTransform,
    otherToCommonTransform: AffineTransform
)

Returns true when a PartitionedMesh intersects with a PartitionedMesh.

Public functions

intersects

fun Vec.intersects(box: Box): Boolean

Returns true when the point (a Vec) intersects with a Box. All points on the boundary of the box (including its vertices) and in the interior of the box intersect with it.

intersects

fun Segment.intersects(box: Box): Boolean

Returns true when a Segment intersects with a Box --- when this segment has at least one point in common with the Box's interior, edges, or vertices

intersects

fun Triangle.intersects(box: Box): Boolean

Returns true when a Triangle intersects with a Box --- When this triangle has at least one point in common with the Box's interior, edges, or vertices.

intersects

fun Parallelogram.intersects(box: Box): Boolean

Returns true when a Parallelogram intersects with a Box --- When the box has at least one point in common with the Parallelogram's interior, edges, or vertices.

intersects

fun Box.intersects(other: Box): Boolean

Returns true when a Box intersects with other --- When it has at least one point in common with other's interior, edges, or vertices.

intersects

fun Parallelogram.intersects(other: Parallelogram): Boolean

Returns true when a Parallelogram intersects with other --- When it has at least one point in common with other's interior, edges, or vertices.

intersects

fun Segment.intersects(other: Segment): Boolean

Returns true when a Segment intersects with another Segment --- when this segment has at least one point (including the start and end points) in common with another Segment.

intersects

fun Triangle.intersects(other: Triangle): Boolean

Returns true when a Triangle intersects with other --- When this triangle has at least one point in common with other's interior, edges, or vertices.

intersects

fun Vec.intersects(other: Vec): Boolean

Returns true if the point (a Vec), intersects other; this only occurs when the two points are equal.

intersects

fun Vec.intersects(parallelogram: Parallelogram): Boolean

Returns true when the point (a Vec) intersects with a Parallelogram. All points on the boundary of the parallelogram (including its vertices) and in the interior of the parallelogram intersect with it.

intersects

fun Segment.intersects(parallelogram: Parallelogram): Boolean

Returns true when a Segment intersects with a Parallelogram --- when this segment has at least one point in common with the Parallelogram's interior, edges, or vertices.

intersects

fun Triangle.intersects(parallelogram: Parallelogram): Boolean

Returns true when a Triangle intersects with a Parallelogram --- When this triangle has at least one point in common with the Parallelogram's interior, edges, or vertices.

intersects

fun Box.intersects(parallelogram: Parallelogram): Boolean

Returns true when a Box intersects with a Parallelogram --- When it has at least one point in common with the Parallelogram's interior, edges, or vertices.

intersects

fun Segment.intersects(point: Vec): Boolean

Returns true when the Segment intersects with a point (a Vec). All points on the segment, including endpoints, intersect with the segment.

intersects

fun Triangle.intersects(point: Vec): Boolean

Returns true when the Triangle intersects with a point (a Vec). All points on the boundary of the triangle (including its vertices) and in the interior of the triangle intersect with it.

intersects

fun Parallelogram.intersects(point: Vec): Boolean

Returns true when the Parallelogram intersects with a point (a Vec). All points on the boundary of the parallelogram (including its vertices) and in the interior of the parallelogram intersect with it.

intersects

fun Box.intersects(point: Vec): Boolean

Returns true when the Box intersects with a point (a Vec). All points on the boundary of the box (including its vertices) and in the interior of the box intersect with it.

intersects

fun Vec.intersects(segment: Segment): Boolean

Returns true when the point (a Vec) intersects with a Segment. All points on the segment, including endpoints, intersect with the segment.

intersects

fun Triangle.intersects(segment: Segment): Boolean

Returns true when a Triangle intersects with a Segment --- when the segment has at least one point in common with the Triangle's interior, edges, or vertices.

intersects

fun Parallelogram.intersects(segment: Segment): Boolean

Returns true when a Parallelogram intersects with a Segment --- when the segment has at least one point in common with the Parallelogram's interior, edges, or vertices.

intersects

fun Box.intersects(segment: Segment): Boolean

Returns true when a Box intersects with a Segment --- when the segment has at least one point in common with the Box's interior, edges, or vertices

intersects

fun Vec.intersects(triangle: Triangle): Boolean

Returns true when the point (a Vec) intersects with a Triangle. All points on the boundary of the triangle (including its vertices) and in the interior of the triangle intersect with it.

intersects

fun Segment.intersects(triangle: Triangle): Boolean

Returns true when a Segment intersects with a Triangle --- when this segment has at least one point in common with the Triangle's interior, edges, or vertices.

intersects

fun Parallelogram.intersects(triangle: Triangle): Boolean

Returns true when a Parallelogram intersects with a Triangle --- When the triangle has at least one point in common with the Parallelogram's interior, edges, or vertices.

intersects

fun Box.intersects(triangle: Triangle): Boolean

Returns true when a Box intersects with a Triangle --- When the triangle has at least one point in common with the Box's interior, edges, or vertices.

intersects

fun PartitionedMesh.intersects(box: Box, meshToBox: AffineTransform): Boolean

Returns true when a PartitionedMesh intersects with a Box.

Note that, because it is expensive to apply a transform to a mesh, this method takes a meshToBox transform as an argument. This transform maps from the PartitionedMesh's coordinate space to the coordinate space that the intersection should be checked in.

intersects

fun Box.intersects(mesh: PartitionedMesh, meshToBox: AffineTransform): Boolean

Returns true when a Box intersects with a PartitionedMesh.

Note that, because it is expensive to apply a transform to a mesh, this method takes a meshToBox transform as an argument. This transform maps from the PartitionedMesh's coordinate space to the coordinate space that the intersection should be checked in.

intersects

fun Parallelogram.intersects(
    mesh: PartitionedMesh,
    meshToParallelogram: AffineTransform
): Boolean

RReturns true when a Parallelogram intersects with a PartitionedMesh.

Note that, because it is expensive to apply a transform to a mesh, this method takes a meshToParallelogram transform as an argument. This transform maps from the PartitionedMesh's coordinate space to the coordinate space that the intersection should be checked in.

intersects

fun Vec.intersects(mesh: PartitionedMesh, meshToPoint: AffineTransform): Boolean

Returns true when the point (a Vec) intersects with mesh. meshToPoint transforms the coordinate space of mesh to the coordinate space that the intersection should be checked in (that of the point). All points along the boundary of the mesh and the meshs interior are considered for intersection.

Performance note: it is expensive to apply a transform to a mesh. To avoid unnecessary calculations, the inverse of meshToPoint is used to perform the mathematically equivalent intersection of the point in mesh’s object coordinates.

intersects

fun Segment.intersects(
    mesh: PartitionedMesh,
    meshToSegment: AffineTransform
): Boolean

Returns true when a Segment intersects with a PartitionedMesh.

Note that, because it is expensive to apply a transform to a mesh, this method takes a meshToSegment transform as an argument. This transform maps from the PartitionedMesh's coordinate space to the coordinate space that the intersection should be checked in.

intersects

fun Triangle.intersects(
    mesh: PartitionedMesh,
    meshToTriangle: AffineTransform
): Boolean

Returns true when a Triangle intersects with a PartitionedMesh.

Note that, because it is expensive to apply a transform to a mesh, this method takes a meshToTriangle transform as an argument. This transform maps from the PartitionedMesh's coordinate space to the coordinate space that the intersection should be checked in.

intersects

fun PartitionedMesh.intersects(
    parallelogram: Parallelogram,
    meshToParallelogram: AffineTransform
): Boolean

Returns true when a PartitionedMesh intersects with a Parallelogram.

Note that, because it is expensive to apply a transform to a mesh, this method takes a meshToParallelogram transform as an argument. This transform maps from the PartitionedMesh's coordinate space to the coordinate space that the intersection should be checked in.

intersects

fun PartitionedMesh.intersects(point: Vec, meshToPoint: AffineTransform): Boolean

Returns true when the PartitionedMesh intersects with point. meshToPoint transforms the coordinate space of mesh to the coordinate space that the intersection should be checked in (that of the point). All points along the boundary of the mesh and the meshs interior are considered for intersection.

Performance note: it is expensive to apply a transform to a mesh. To avoid unnecessary calculations, the inverse of meshToPoint is used to perform the mathematically equivalent intersection of the point in mesh’s object coordinates.

intersects

fun PartitionedMesh.intersects(
    segment: Segment,
    meshToSegment: AffineTransform
): Boolean

Returns true when a PartitionedMesh intersects with a Segment.

Note that, because it is expensive to apply a transform to a mesh, this method takes a meshToSegment transform as an argument. This transform maps from the PartitionedMesh's coordinate space to the coordinate space that the intersection should be checked in.

intersects

fun PartitionedMesh.intersects(
    triangle: Triangle,
    meshToTriangle: AffineTransform
): Boolean

Returns true when a PartitionedMesh intersects with a Triangle.

Note that, because it is expensive to apply a transform to a mesh, this method takes a meshToTriangle transform as an argument. This transform maps from the PartitionedMesh's coordinate space to the coordinate space that the intersection should be checked in.

intersects

fun PartitionedMesh.intersects(
    other: PartitionedMesh,
    thisToCommonTransForm: AffineTransform,
    otherToCommonTransform: AffineTransform
): Boolean

Returns true when a PartitionedMesh intersects with a PartitionedMesh.

Note that, because it is expensive to apply a transform to a mesh, this method takes two AffineTransform objects: thisToCommonTransForm and otherToCommonTransform. These transforms map from the respective PartitionedMeshs' coordinate spaces to the common coordinate space that the intersection should be checked in.