Skip to main content

@novorender/web_app / segmentPlaneIntersection

Function: segmentPlaneIntersection()

function segmentPlaneIntersection(segment, plane): undefined | vec3

Calculate the intersection point between ray and plane

Parameters

ParameterTypeDescription
segment[ReadonlyVec3, ReadonlyVec3]segment as an array with start and end point
planeReadonlyVec4choose if planes under clipping or outlines should be used

Returns

undefined | vec3

vector of the intersection point, undefined if plane and segment never intersects

Defined in

@novorender/web_app/calculations/3d/plane.ts:11