Vector2.Barycentric Method (Microsoft.Xna.Framework)

Creates a new Vector2 that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 2d-triangle.

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

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.


Type: Microsoft.Xna.Framework.Vector2
The first vector of 2d-triangle.
Type: Microsoft.Xna.Framework.Vector2
The second vector of 2d-triangle.
Type: Microsoft.Xna.Framework.Vector2
The third vector of 2d-triangle.
Type: System.Single
Barycentric scalar b2 which represents a weighting factor towards second vector of 2d-triangle.
Type: System.Single
Barycentric scalar b3 which represents a weighting factor towards third vector of 2d-triangle.

Return Value

Type: Microsoft.Xna.Framework.Vector2
The cartesian translation of barycentric coordinates.
Supported in:

 Windows DirectX Desktop
 Linux Desktop
 Windows OpenGL Desktop