示例#1
0
        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);
        }
示例#2
0
 static public RaycastHit SphereCastGetHit(this LineSegment3 item, float radius, int layer_mask = IntBits.ALL_BITS)
 {
     return(item.GetRay().SphereCastGetHit(radius, item.GetLength(), layer_mask));
 }
示例#3
0
 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));
 }
示例#4
0
 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));
 }
示例#5
0
 static public RaycastHit CastGetHit(this LineSegment3 item, int layer_mask = IntBits.ALL_BITS)
 {
     return(item.GetRay().CastGetHit(item.GetLength(), layer_mask));
 }
示例#6
0
 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));
 }
示例#7
0
 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));
 }