MathHelper.Barycentric Method (Microsoft.Xna.Framework)

Returns the Cartesian coordinate for one axis of a point that is defined by a given triangle and two normalized barycentric (areal) coordinates.

Namespace: Microsoft.Xna.Framework
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.1082)
  • C#
  • VB
  • F#
public static float Barycentric(
	float value1, 
	float value2, 
	float value3, 
	float amount1, 
	float amount2
)

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

Parameters

value1
Type: System.Single
The coordinate on one axis of vertex 1 of the defining triangle.
value2
Type: System.Single
The coordinate on the same axis of vertex 2 of the defining triangle.
value3
Type: System.Single
The coordinate on the same axis of vertex 3 of the defining triangle.
amount1
Type: System.Single
The normalized barycentric (areal) coordinate b2, equal to the weighting factor for vertex 2, the coordinate of which is specified in value2.
amount2
Type: System.Single
The normalized barycentric (areal) coordinate b3, equal to the weighting factor for vertex 3, the coordinate of which is specified in value3.

Return Value

Type: System.Single
Cartesian coordinate of the specified point with respect to the axis being used.
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web