19 template <
typename Real>
53 std::set<EdgeKey<false>>
const&
GetOverlap()
const;
67 void InsertionSort (std::vector<Endpoint>& endpoint, std::vector<int>& lookup);
85 template <
typename Real>
93 template <
typename Real>
97 int intrSize =
static_cast<int>(
mRectangles.size()), endpSize = 2 * intrSize;
100 for (
int i = 0, j = 0; i < intrSize; ++i)
126 for (
int j = 0; j < endpSize; ++j)
133 std::set<int> active;
139 for (
int i = 0; i < endpSize; ++i)
143 if (endpoint.
type == 0)
147 for (
auto activeIndex : active)
155 if (activeIndex < index)
165 active.insert(index);
174 template <
typename Real>
184 template <
typename Real>
190 template <
typename Real>
198 int endpSize =
static_cast<int>(endpoint.size());
199 for (
int j = 1; j < endpSize; ++j)
203 while (i >= 0 && key < endpoint[i])
243 endpoint[i + 1] = e0;
248 endpoint[i + 1] = key;
249 lookup[2 * key.
index + key.
type] = i + 1;
253 template <
typename Real>
260 template <
typename Real>
266 template <
typename Real>
std::vector< Endpoint > mYEndpoints
std::vector< Endpoint > mXEndpoints
GLsizei const GLfloat * value
std::vector< int > mYLookup
void SetRectangle(int i, AlignedBox2< Real > const &rectangle)
void GetRectangle(int i, AlignedBox2< Real > &rectangle) const
RectangleManager()=delete
bool operator<(Endpoint const &endpoint) const
std::vector< int > mXLookup
void InsertionSort(std::vector< Endpoint > &endpoint, std::vector< int > &lookup)
std::vector< AlignedBox2< Real > > & mRectangles
std::set< EdgeKey< false > > mOverlap
std::set< EdgeKey< false > > const & GetOverlap() const
RectangleManager & operator=(RectangleManager const &)=delete
GLint GLint GLsizei GLint GLenum GLenum type