Exemplo n.º 1
0
 public static void Line(Line line, Color color, float alpha = 1.0f)
 {
     SpriteBatch.Draw(Pixel, line.Start, null, color * Math.Min(alpha, 1), line.Angle().Radians, Vector2.Zero, new Vector2(line.Length(), 1), SpriteEffects.None, 0);
 }
Exemplo n.º 2
0
 public float GetInterLineMeasurement(Line l2)
 {
     float cutoff_distance = (this.Length() + l2.Length()) / measure_factor;
     return (l2.GetLengthCloserThan(cutoff_distance, this.PositionData) + this.GetLengthCloserThan(cutoff_distance, l2.PositionData)) / cutoff_distance * measure_factor;
 }