protected void RenderCorner(OverlayData overlayData, Data data) { var cornerDelta = data.GetCornerDelta(Mathf.Min(BorderOverlayWidth / 2, data.halfWidth)); var line = new StraightTrajectory(data.leftPos + cornerDelta, data.rightPos - cornerDelta); line.Render(overlayData); }
public virtual bool Contains(Segment3 ray, out float t) { var line = new StraightTrajectory(GetHitPosition(ray, out t), Center); var contains = !BorderLines.Any(b => Intersection.Intersect(line, b)); return(contains); }
public void Divide(out ITrajectory trajectory1, out ITrajectory trajectory2) { var middle = (Trajectory.a + Trajectory.b) / 2; trajectory1 = new StraightTrajectory(Trajectory.a, middle); trajectory2 = new StraightTrajectory(middle, Trajectory.b); }
public bool Equals(StraightTrajectory other) { if (other is null) { return(false); } else if (ReferenceEquals(this, other)) { return(true); } else { return(Equal(Trajectory, other.Trajectory)); } }