Packageaway3d.tools.utils
Classpublic class BaryCentricTest

Classe returns the uv's from a Vector3D on a triangle plane defined with Vertex objects. Null if outside the triangle definition This class was made to allow uv retreiving from a hittest in BSP projects using the BSPHitTest.getUVIntersectPosition method

Public Methods
 MethodDefined by
  
getUVs(v0:Vertex, v1:Vertex, v2:Vertex, uv0:UV, uv1:UV, uv2:UV, hit:Vector3D, uv:UV = null):UV
[static] Returns the uv's from a Vector3D on a triangle plane defined with Vertex objects.
BaryCentricTest
Method detail
getUVs()method
public static function getUVs(v0:Vertex, v1:Vertex, v2:Vertex, uv0:UV, uv1:UV, uv2:UV, hit:Vector3D, uv:UV = null):UV

Returns the uv's from a Vector3D on a triangle plane defined with Vertex objects. Null if outside the triangle definition

Parameters
v0:Vertex — Vertex. The face v0
 
v1:Vertex — Vertex. The face v1
 
v2:Vertex — Vertex. The face v2
 
uv0:UV — UV. The face UV uv0
 
uv1:UV — UV. The face UV uv1
 
uv2:UV — UV. The face UV uv2
 
hit:Vector3D — Vector3D. The intersect point on triangle plane.
 
uv:UV (default = null) — [optional] UV. To prevent generation of new UV object return. Optional uv object holder can be passed.

Returns
UV
Wiki link
Click to go to the wiki page for 'away3d.tools.utils.BaryCentricTest'

Code examples

Comments