Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • MeshBitByBit

Index

Constructors

constructor

Methods

calculateTrianglePlane

  • Calculates plane equation from triangle vertices (normal vector and distance from origin). Returns undefined if triangle is degenerate (zero area, collinear points). Example: triangle=[[0,0,0], [1,0,0], [0,1,0]] → {normal:[0,0,1], d:0} (XY plane)

    group

    traingle

    shortname

    triangle plane

    drawable

    false

    Parameters

    Returns TrianglePlane3

    triangle plane

meshMeshIntersectionPoints

  • Calculates intersection points between two meshes as point arrays (one array per polyline). Closed polylines have first point duplicated at end. Example: cube-sphere intersection → arrays of points defining intersection curves

    group

    mesh

    shortname

    mesh-mesh int points

    drawable

    false

    Parameters

    Returns Point3[][]

    array of intersection points

meshMeshIntersectionPolylines

  • Calculates intersection polylines between two meshes by sorting segments into connected paths. Segments are joined end-to-end to form continuous or closed curves. Example: cube-sphere intersection → closed polyline loops where surfaces meet

    group

    mesh

    shortname

    mesh-mesh int polylines

    drawable

    true

    Parameters

    Returns Polyline3[]

    array of intersection polylines

meshMeshIntersectionSegments

  • Calculates all intersection segments between two triangle meshes (pairwise triangle tests). Returns array of line segments where mesh surfaces intersect. Example: cube mesh intersecting with sphere mesh → multiple segments forming intersection curve

    group

    mesh

    shortname

    mesh-mesh int segments

    drawable

    false

    Parameters

    Returns Segment3[]

    array of intersection segments

signedDistanceToPlane

  • Calculates signed distance from a point to a plane (positive=above plane, negative=below). Example: point=[0,5,0], plane={normal:[0,1,0], d:0} → 5 (point is 5 units above XZ plane)

    group

    base

    shortname

    signed dist to plane

    drawable

    false

    Parameters

    Returns number

    signed distance

triangleTriangleIntersection

  • Calculates intersection segment of two triangles (line segment where they cross). Returns undefined if triangles don't intersect, are parallel, or are coplanar. Example: triangle1=[[0,0,0], [2,0,0], [1,2,0]], triangle2=[[1,-1,1], [1,1,1], [1,1,-1]] → [[1,0,0], [1,1,0]]

    group

    traingle

    shortname

    triangle-triangle int

    drawable

    false

    Parameters

    Returns Segment3

    intersection segment or undefined if no intersection

Generated using TypeDoc