static public bool IsIntersecting(this Bounds item, LineSegment3 line_segment, out float distance) { if (item.IntersectRay(line_segment.GetRay(), out distance)) { if (distance <= line_segment.GetLength()) { return(true); } } return(false); }
static public RaycastHit SphereCastGetHit(this LineSegment3 item, float radius, int layer_mask = IntBits.ALL_BITS) { return(item.GetRay().SphereCastGetHit(radius, item.GetLength(), layer_mask)); }
static public RaycastHit SphereCastDiscerningGetHit(this LineSegment3 item, float radius, Predicate <RaycastHit> predicate, int layer_mask = IntBits.ALL_BITS) { return(item.GetRay().SphereCastDiscerningGetHit(radius, predicate, item.GetLength(), layer_mask)); }
static public bool SphereCastAgainstOpposingDirection(this LineSegment3 item, float radius, out RaycastHit hit, int layer_mask = IntBits.ALL_BITS) { return(item.GetRay().SphereCastAgainstOpposingDirection(radius, out hit, item.GetLength(), layer_mask)); }
static public RaycastHit CastGetHit(this LineSegment3 item, int layer_mask = IntBits.ALL_BITS) { return(item.GetRay().CastGetHit(item.GetLength(), layer_mask)); }
static public bool Cast(this LineSegment3 item, out RaycastHit hit, int layer_mask = IntBits.ALL_BITS) { return(item.GetRay().Cast(out hit, item.GetLength(), layer_mask)); }
static public bool CastDiscerning(this LineSegment3 item, Predicate <RaycastHit> predicate, int layer_mask = IntBits.ALL_BITS) { return(item.GetRay().CastDiscerning(predicate, item.GetLength(), layer_mask)); }