//-----------------------------------------------------------------------
        //
        //ORIGINAL LINE: void _findAllIntersections(const Shape& STLAllocator<U, AllocPolicy>, List<IntersectionInShape>& intersections) const
        private void _findAllIntersections(Shape other, ref std_vector<IntersectionInShape> intersections) {
            for (ushort i = 0; i < getSegCount(); i++) {
                Segment2D seg1 = new Segment2D(getPoint(i), getPoint(i + 1));

                for (ushort j = 0; j < other.getSegCount(); j++) {
                    Segment2D seg2 = new Segment2D(other.getPoint(j), other.getPoint(j + 1));

                    Vector2 intersect = new Vector2();
                    if (seg1.findIntersect(seg2, ref intersect)) {
                        IntersectionInShape inter = new IntersectionInShape(i, j, intersect);
                        // check if intersection is "borderline" : too near to a vertex
                        if ((seg1.mA - intersect).SquaredLength < 1e-8) {
                            inter.onVertex[0] = true;
                        }
                        if ((seg1.mB - intersect).SquaredLength < 1e-8) {
                            inter.onVertex[0] = true;
                            inter.index[0]++;
                        }
                        if ((seg2.mA - intersect).SquaredLength < 1e-8) {
                            inter.onVertex[1] = true;
                        }
                        if ((seg2.mB - intersect).SquaredLength < 1e-8) {
                            inter.onVertex[1] = true;
                            inter.index[1]++;
                        }

                        intersections.push_back(inter);
                    }
                }
            }
        }