~sharpie/geos/3.3.2

« back to all changes in this revision

Viewing changes to source/headers/geos/noding/FastSegmentSetIntersectionFinder.h

  • Committer: Bazaar Package Importer
  • Author(s): Fabio Tranchitella
  • Date: 2009-03-27 15:54:54 UTC
  • mfrom: (1.2.1 upstream) (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090327155454-o3u9j86rzrtcp5vl
Tags: 3.1.0-1
* New upstream release.
* This version includes also a missing header inclusion, which caused FTBFS
  on armel. (Closes: #520447)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**********************************************************************
 
2
 * $Id: FastSegmentSetIntersectionFinder.h 2263 2009-01-29 18:56:00Z mloskot $
 
3
 *
 
4
 * GEOS - Geometry Engine Open Source
 
5
 * http://geos.refractions.net
 
6
 *
 
7
 * Copyright (C) 2006 Refractions Research Inc.
 
8
 *
 
9
 * This is free software; you can redistribute and/or modify it under
 
10
 * the terms of the GNU Lesser General Public Licence as published
 
11
 * by the Free Software Foundation. 
 
12
 * See the COPYING file for more information.
 
13
 *
 
14
 *
 
15
 **********************************************************************/
 
16
 
 
17
#ifndef GEOS_NODING_FASTSEGMENTSETINTERSECTIONFINDER_H
 
18
#define GEOS_NODING_FASTSEGMENTSETINTERSECTIONFINDER_H
 
19
 
 
20
#include <geos/noding/SegmentString.h>
 
21
#include <geos/noding/MCIndexSegmentSetMutualIntersector.h>
 
22
 
 
23
 
 
24
//forward declarations
 
25
namespace geos {
 
26
        namespace noding { 
 
27
                class SegmentIntersectionDetector;
 
28
                class SegmentSetMutualIntersector;
 
29
                //class MCIndexSegmentSetMutualIntersector : public SegmentSetMutualIntersector;
 
30
        }
 
31
}
 
32
 
 
33
 
 
34
namespace geos {
 
35
namespace noding { // geos::noding
 
36
 
 
37
/** \brief
 
38
 * Finds if two sets of {@link SegmentStrings}s intersect.
 
39
 *
 
40
 * Uses indexing for fast performance and to optimize repeated tests
 
41
 * against a target set of lines.
 
42
 * Short-circuited to return as soon an intersection is found.
 
43
 *
 
44
 * @version 1.7
 
45
 */
 
46
class FastSegmentSetIntersectionFinder
 
47
{
 
48
private:
 
49
        MCIndexSegmentSetMutualIntersector * segSetMutInt; 
 
50
        geos::algorithm::LineIntersector * lineIntersector;
 
51
 
 
52
protected:
 
53
public:
 
54
        FastSegmentSetIntersectionFinder( SegmentString::ConstVect * baseSegStrings);
 
55
 
 
56
        ~FastSegmentSetIntersectionFinder();
 
57
        
 
58
        /**
 
59
         * Gets the segment set intersector used by this class.
 
60
         * This allows other uses of the same underlying indexed structure.
 
61
         * 
 
62
         * @return the segment set intersector used
 
63
         */
 
64
        SegmentSetMutualIntersector * getSegmentSetIntersector()
 
65
        {
 
66
                return segSetMutInt;
 
67
        }
 
68
 
 
69
        bool intersects( SegmentString::ConstVect * segStrings);
 
70
        bool intersects( SegmentString::ConstVect * segStrings, SegmentIntersectionDetector * intDetector);
 
71
 
 
72
};
 
73
 
 
74
} // geos::noding
 
75
} // geos
 
76
 
 
77
#endif // GEOS_NODING_FASTSEGMENTSETINTERSECTIONFINDER_H
 
78
/**********************************************************************
 
79
 * $Log$
 
80
 **********************************************************************/
 
81