| GeometryHelperGetPointFromBarycentric Method |
Gets the point on the triangle defined by the given barycentric coordinates.
Namespace: DigitalRune.GeometryAssembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.18.0.0 (1.18.2.14427)
Syntax public static Vector3F GetPointFromBarycentric(
Triangle triangle,
float u,
float v,
float w
)
Public Shared Function GetPointFromBarycentric (
triangle As Triangle,
u As Single,
v As Single,
w As Single
) As Vector3F
public:
static Vector3F GetPointFromBarycentric(
Triangle triangle,
float u,
float v,
float w
)
static member GetPointFromBarycentric :
triangle : Triangle *
u : float32 *
v : float32 *
w : float32 -> Vector3F
Parameters
- triangle
- Type: DigitalRune.Geometry.ShapesTriangle
The triangle. - u
- Type: SystemSingle
The barycentric coordinate u. - v
- Type: SystemSingle
The barycentric coordinate v. - w
- Type: SystemSingle
The barycentric coordinate w.
Return Value
Type:
Vector3F
The point computes as
u *
Vertex0
+
v *
Vertex1
+
w *
Vertex2.
Remarks
The barycentric coordinates are not clamped. The resulting point can lie outside of the
triangle.
See Also