Skip to content

Documentation / @ripl/3d / rayHitBarycentric

Function: rayHitBarycentric() ​

rayHitBarycentric<TValue>(hit, a, b, c): TValue

Defined in: 3d/src/math/ray.ts:210

Reconstructs a point on a triangle from the barycentric weights of a RayTriangleHit.

Type Parameters ​

Type Parameter
TValue extends [number, number] | Vector3

Parameters ​

ParameterType
hitRayTriangleHit
aTValue
bTValue
cTValue

Returns ​

TValue