Skip to main content

@novorender/api / segmentPlaneIntersection

Function: segmentPlaneIntersection()

function segmentPlaneIntersection(segment, plane): undefined | vec3;

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

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