public IntersectionData(bool RecipientIsFunctionCaller, LineSegment IntersectionAxis, LineSegment PenetratedSideSegment, bool ValidOverlap) { this.RecipientIsFunctionCaller = RecipientIsFunctionCaller; this.IntersectionAxis = IntersectionAxis; this.PenetratedSideSegment = PenetratedSideSegment; this.ValidOverlap = ValidOverlap; }
private void DrawSegment(SpriteBatch spriteBatch, LineSegment lineSegment, Texture2D lineTexture, float lineWeight = 1F) { float lineAngle = (float)Math.Atan2(lineSegment.EndPoints[1].Y - lineSegment.EndPoints[0].Y, lineSegment.EndPoints[1].X - lineSegment.EndPoints[0].X); spriteBatch.Draw(lineTexture, lineSegment.Midpoint, null, Color.White, lineAngle + ((float)Math.PI / 2), new Vector2((float)lineTexture.Width / 2, (float)lineTexture.Height / 2), new Vector2(lineWeight / lineTexture.Width, lineSegment.Length / lineTexture.Height), SpriteEffects.None, 0); }