getInterpolation

fun getInterpolation(point: Vector3, p1: Vector3, p2: Vector3, p3: Vector3, v1: Vector3, v2: Vector3, v3: Vector3, target: Vector3): Vector3?

Computes the value barycentrically interpolated for the given point on the triangle. Returns null if the triangle is degenerate.

Return

The interpolated value, or null if the triangle is degenerate.

Parameters

point

Position of interpolated point.

p1

The first corner of the triangle.

p2

The second corner of the triangle.

p3

The third corner of the triangle.

v1

Value to interpolate of first vertex.

v2

Value to interpolate of second vertex.

v3

Value to interpolate of third vertex.

target

The target vector that is used to store the method's result.