Skip to main content

function.segmentPlaneIntersection

API > segmentPlaneIntersection

Function: segmentPlaneIntersection

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

Source

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