Class TriangleInterpolation
Supplies various linear interpolation methods from a triangle.
The conventions are based on a XY plane,
with an equilateral triangle of side 1, vertices:
(0.5f, -0.5f / Sqrt3)
(0, 1 / Sqrt3)
(-0.5f, -0.5f / Sqrt3)
Inheritance
System.Object
TriangleInterpolation
Assembly: Sylves.dll
Syntax
public static class TriangleInterpolation : Object
Methods
GetCorners(MeshData, Int32, Int32, Boolean, out Vector3, out Vector3, out Vector3)
Declaration
public static void GetCorners(MeshData mesh, int submesh, int face, bool invertWinding, out Vector3 v1, out Vector3 v2, out Vector3 v3)
Parameters
GetCorners(MeshData, Int32, Int32, Boolean, Single, Single, out Vector3, out Vector3, out Vector3, out Vector3, out Vector3, out Vector3)
Declaration
public static void GetCorners(MeshData mesh, int submesh, int face, bool invertWinding, float meshOffset1, float meshOffset2, out Vector3 v1, out Vector3 v2, out Vector3 v3, out Vector3 v4, out Vector3 v5, out Vector3 v6)
Parameters
Interpolate(Vector2, Vector2, Vector2)
Declaration
public static Func<Vector3, Vector2> Interpolate(Vector2 v1, Vector2 v2, Vector2 v3)
Parameters
Returns
Interpolate(Vector2, Vector2, Vector2, Vector2, Vector2, Vector2)
Declaration
public static Func<Vector3, Vector2> Interpolate(Vector2 v1, Vector2 v2, Vector2 v3, Vector2 v4, Vector2 v5, Vector2 v6)
Parameters
Returns
Interpolate(Vector3, Vector3, Vector3)
Linear interpolates from a triangle of size 1 in the XY plane to the triangle supplied by v1 to v3
The z value of p is unused.
Declaration
public static Func<Vector3, Vector3> Interpolate(Vector3 v1, Vector3 v2, Vector3 v3)
Parameters
Returns
Interpolate(Vector3, Vector3, Vector3, Vector3, Vector3, Vector3)
Declaration
public static Func<Vector3, Vector3> Interpolate(Vector3 v1, Vector3 v2, Vector3 v3, Vector3 v4, Vector3 v5, Vector3 v6)
Parameters
Returns
Interpolate(Vector4, Vector4, Vector4)
Declaration
public static Func<Vector3, Vector4> Interpolate(Vector4 v1, Vector4 v2, Vector4 v3)
Parameters
Returns
Interpolate(Vector4, Vector4, Vector4, Vector4, Vector4, Vector4)
Declaration
public static Func<Vector3, Vector4> Interpolate(Vector4 v1, Vector4 v2, Vector4 v3, Vector4 v4, Vector4 v5, Vector4 v6)
Parameters
Returns
InterpolateNormal(MeshData, Int32, Int32, Boolean)
Declaration
public static Func<Vector3, Vector3> InterpolateNormal(MeshData mesh, int submesh, int face, bool invertWinding)
Parameters
Type |
Name |
Description |
MeshData |
mesh |
|
System.Int32 |
submesh |
|
System.Int32 |
face |
|
System.Boolean |
invertWinding |
|
Returns
InterpolatePosition(MeshData, Int32, Int32, Boolean)
Declaration
public static Func<Vector3, Vector3> InterpolatePosition(MeshData mesh, int submesh, int face, bool invertWinding)
Parameters
Type |
Name |
Description |
MeshData |
mesh |
|
System.Int32 |
submesh |
|
System.Int32 |
face |
|
System.Boolean |
invertWinding |
|
Returns
InterpolatePosition(MeshData, Int32, Int32, Boolean, Single, Single)
Declaration
public static Func<Vector3, Vector3> InterpolatePosition(MeshData mesh, int submesh, int face, bool invertWinding, float meshOffset1, float meshOffset2)
Parameters
Type |
Name |
Description |
MeshData |
mesh |
|
System.Int32 |
submesh |
|
System.Int32 |
face |
|
System.Boolean |
invertWinding |
|
System.Single |
meshOffset1 |
|
System.Single |
meshOffset2 |
|
Returns
InterpolateTangent(MeshData, Int32, Int32, Boolean)
Declaration
public static Func<Vector3, Vector4> InterpolateTangent(MeshData mesh, int submesh, int face, bool invertWinding)
Parameters
Type |
Name |
Description |
MeshData |
mesh |
|
System.Int32 |
submesh |
|
System.Int32 |
face |
|
System.Boolean |
invertWinding |
|
Returns
InterpolateUv(MeshData, Int32, Int32, Boolean)
Declaration
public static Func<Vector3, Vector2> InterpolateUv(MeshData mesh, int submesh, int face, bool invertWinding)
Parameters
Type |
Name |
Description |
MeshData |
mesh |
|
System.Int32 |
submesh |
|
System.Int32 |
face |
|
System.Boolean |
invertWinding |
|
Returns
Jacobi(Vector2, Vector2, Vector2)
Declaration
public static Func<Vector3, Matrix4x4> Jacobi(Vector2 v1, Vector2 v2, Vector2 v3)
Parameters
Returns
Jacobi(Vector3, Vector3, Vector3)
Declaration
public static Func<Vector3, Matrix4x4> Jacobi(Vector3 v1, Vector3 v2, Vector3 v3)
Parameters
Returns
Jacobi(Vector3, Vector3, Vector3, Vector3, Vector3, Vector3)
Declaration
public static Func<Vector3, Matrix4x4> Jacobi(Vector3 v1, Vector3 v2, Vector3 v3, Vector3 v4, Vector3 v5, Vector3 v6)
Parameters
Returns
JacobiPosition(MeshData, Int32, Int32, Boolean)
Declaration
public static Func<Vector3, Matrix4x4> JacobiPosition(MeshData mesh, int submesh, int face, bool invertWinding)
Parameters
Type |
Name |
Description |
MeshData |
mesh |
|
System.Int32 |
submesh |
|
System.Int32 |
face |
|
System.Boolean |
invertWinding |
|
Returns
JacobiPosition(MeshData, Int32, Int32, Boolean, Single, Single)
Declaration
public static Func<Vector3, Matrix4x4> JacobiPosition(MeshData mesh, int submesh, int face, bool invertWinding, float meshOffset1, float meshOffset2)
Parameters
Type |
Name |
Description |
MeshData |
mesh |
|
System.Int32 |
submesh |
|
System.Int32 |
face |
|
System.Boolean |
invertWinding |
|
System.Single |
meshOffset1 |
|
System.Single |
meshOffset2 |
|
Returns
JacobiUv(MeshData, Int32, Int32, Boolean)
Declaration
public static Func<Vector3, Matrix4x4> JacobiUv(MeshData mesh, int submesh, int face, bool invertWinding)
Parameters
Type |
Name |
Description |
MeshData |
mesh |
|
System.Int32 |
submesh |
|
System.Int32 |
face |
|
System.Boolean |
invertWinding |
|
Returns