get_uv


Description:

[ Version ( since = "1.10" ) ]
public bool get_uv (Point3D? p, Vec2 uv_a, Vec2 uv_b, Vec2 uv_c, out Vec2 res)

Computes the UV coordinates of the given point p.

The point p must lie on the same plane as the triangle this; if the point is not coplanar, the result of this function is undefined. If p is null, the point will be set in (0, 0, 0).

The UV coordinates will be placed in the res vector:

  • `res.x = u`
  • `res.y = v`

See also: get_barycoords

Parameters:

this

a Triangle

p

a Point3D

uv_a

the UV coordinates of the first point

uv_b

the UV coordinates of the second point

uv_c

the UV coordinates of the third point

res

a vector containing the UV coordinates of the given point p

Returns:

`true` if the coordinates are valid