private void UpdatePoints()
{
// compute line points
Vector2 lineVector = point2 - point1;
// get the right vector of the line
Vector2 right = new Vector2(-lineVector.Y, lineVector.X);
right.Normalize();
Vector2 leftStart = point1 + right * -lineWidth/2f;
Vector2 rightStart = point1 + right * lineWidth/2f;
Vector2 leftEnd = point2 + right * -lineWidth/2f;
Vector2 rightEnd = point2 + right * lineWidth/2f;
this.v = new float[]
{
leftStart.X, leftStart.Y,
rightStart.X, rightStart.Y,
leftEnd.X, leftEnd.Y,
rightStart.X, rightStart.Y,
rightEnd.X,rightEnd.Y,
leftEnd.X, leftEnd.Y
};
this.UpdateVertex();
}