27 #ifdef WITH_CXX_GUARDEDALLOC
74 #ifdef WITH_CXX_GUARDEDALLOC
75 MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:Intersection")
80 # pragma warning(push)
81 # pragma warning(disable : 4521)
84 template<
class T,
class Po
int>
class Segment {
90 Segment(
T &s,
const Point &iA,
const Point &iB)
107 _edge = iBrother.
edge();
110 _Intersections = iBrother._Intersections;
111 _order = iBrother._order;
116 _edge = iBrother._edge;
119 _Intersections = iBrother._Intersections;
120 _order = iBrother._order;
125 _Intersections.clear();
130 return (i % 2 == 0) ? A : B;
135 if (_edge == iBrother._edge) {
144 _Intersections.push_back(i);
150 if ((A == S[0]) || (A == S[1])) {
154 if ((B == S[0]) || (B == S[1])) {
163 return _Intersections;
180 std::vector<Intersection<Segment<T, Point>> *>
184 #ifdef WITH_CXX_GUARDEDALLOC
185 MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:Segment")
190 # pragma warning(pop)
221 iend = _Intersections.end();
239 vector<Segment<T, Point> *> toadd;
240 typename vector<Segment<T, Point> *>::iterator s, send;
241 for (s = segments.begin(), send = segments.end(); s != send; s++) {
242 if (p == (*(*s))[0]) {
243 toadd.push_back((*s));
249 for (s = toadd.begin(), send = toadd.end(); s != send; s++) {
266 if (
true == S->
order()) {
267 v0[0] = ((*S)[0])[0];
268 v0[1] = ((*S)[0])[1];
269 v1[0] = ((*S)[1])[0];
270 v1[1] = ((*S)[1])[1];
273 v1[0] = ((*S)[0])[0];
274 v1[1] = ((*S)[0])[1];
275 v0[0] = ((*S)[1])[0];
276 v0[1] = ((*S)[1])[1];
278 for (
typename std::list<
Segment<T, Point> *>::iterator s = _set.begin(), send = _set.end();
282 if (
true != binrule(*S, *currentS)) {
286 if (
true == currentS->
order()) {
287 v2[0] = ((*currentS)[0])[0];
288 v2[1] = ((*currentS)[0])[1];
289 v3[0] = ((*currentS)[1])[0];
290 v3[1] = ((*currentS)[1])[1];
293 v3[0] = ((*currentS)[0])[0];
294 v3[1] = ((*currentS)[0])[1];
295 v2[0] = ((*currentS)[1])[0];
296 v2[1] = ((*currentS)[1])[1];
308 _Intersections.push_back(inter);
310 S->AddIntersection(inter);
312 currentS->AddIntersection(inter);
322 _IntersectedEdges.push_back(s);
329 return _IntersectedEdges;
334 return _Intersections;
338 std::list<Segment<T, Point> *>
340 std::vector<Segment<T, Point> *> _IntersectedEdges;
341 std::vector<Intersection<Segment<T, Point>> *> _Intersections;
343 #ifdef WITH_CXX_GUARDEDALLOC
344 MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:SweepLine")
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
Read Guarded memory(de)allocation.
ATTR_WARN_UNUSED_RESULT const BMVert * v2
Intersection(EdgeClass *eA, real ta, EdgeClass *eB, real tb)
real getParameter(Edge *iEdge)
Intersection(const Intersection &iBrother)
vector< Intersection< Segment< T, Point > > * > & intersections()
Segment(const Segment< T, Point > &iBrother)
Segment(T &s, const Point &iA, const Point &iB)
bool operator==(const Segment< T, Point > &iBrother)
bool CommonVertex(const Segment< T, Point > &S, Point &CP)
void AddIntersection(Intersection< Segment< T, Point >> *i)
Point operator[](const unsigned short int &i) const
Segment(Segment< T, Point > &iBrother)
vector< Intersection< Segment< T, Point > > * > & intersections()
void process(Point &p, vector< Segment< T, Point > * > &segments, binary_rule< Segment< T, Point >, Segment< T, Point >> &binrule, real epsilon=M_EPSILON)
void add(Segment< T, Point > *S, binary_rule< Segment< T, Point >, Segment< T, Point >> &binrule, real epsilon)
vector< Segment< T, Point > * > & intersectedEdges()
void remove(Segment< T, Point > *s)
intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1, const Vec2r &p2, const Vec2r &p3, const Vec2r &p4, real &t, real &u, real epsilon)
static const real M_EPSILON
std::vector< ElementType, Eigen::aligned_allocator< ElementType > > vector
binary_rule(const binary_rule< T3, T4 > &brother)
virtual bool operator()(T1 &, T2 &)