Beispiel #1
0
        //MARK: Segment Query Functions

        public float SegmentQueryFunc(SegmentQueryContext context, cpShape shape, object data)
        {
            cpSegmentQueryInfo info = null;

            if (
                !cpShapeFilter.Reject(shape.filter, context.filter) &&
                shape.SegmentQuery(context.start, context.end, context.radius, ref info)
                )
            {
                context.func(shape, info.point, info.normal, info.alpha, data);
            }

            return(1.0f);
        }
Beispiel #2
0
        //MARK: Segment Query Functions
        public float SegmentQueryFunc(SegmentQueryContext context, cpShape shape, object data)
        {
            cpSegmentQueryInfo info = null;

            if (
                !cpShapeFilter.Reject(shape.filter, context.filter) &&
                shape.SegmentQuery(context.start, context.end, context.radius, ref info)
            )
            {
                context.func(shape, info.point, info.normal, info.alpha, data);
            }

            return 1.0f;
        }