Skip to main content

clipSegmentToSlab

Callable

  • clipSegmentToSlab(a: Vec3, b: Vec3, plane0Normal: Vec3, plane0D: number, plane1Normal: Vec3, plane1D: number, eps?: number): null | { a: Vec3; b: Vec3 }

  • Clip a segment to a slab defined by two parallel planes. Returns the clipped segment or null if entirely outside.


    Parameters

    • a: Vec3
    • b: Vec3
    • plane0Normal: Vec3
    • plane0D: number
    • plane1Normal: Vec3
    • plane1D: number
    • eps: number = CLIP_EPSILON

    Returns null | { a: Vec3; b: Vec3 }