ReactOS 0.4.15-dev-7681-g776c3a3
ArcTdirSorter Class Reference

#include <arcsorter.h>

Inheritance diagram for ArcTdirSorter:
Collaboration diagram for ArcTdirSorter:

Public Member Functions

 ArcTdirSorter (Subdivider &)
 
- Public Member Functions inherited from ArcSorter
 ArcSorter (Subdivider &)
 
void qsort (Arc **a, int n)
 

Private Member Functions

int qscmp (char *, char *)
 

Additional Inherited Members

virtual int qscmp (char *, char *)
 
- Protected Attributes inherited from ArcSorter
Subdividersubdivider
 

Detailed Description

Definition at line 65 of file arcsorter.h.

Constructor & Destructor Documentation

◆ ArcTdirSorter()

ArcTdirSorter::ArcTdirSorter ( Subdivider s)

Definition at line 125 of file arcsorter.cc.

125 : ArcSorter(s)
126{
127}
GLdouble s
Definition: gl.h:2039

Member Function Documentation

◆ qscmp()

int ArcTdirSorter::qscmp ( char i,
char j 
)
privatevirtual

Reimplemented from ArcSorter.

Definition at line 138 of file arcsorter.cc.

139{
140 Arc *jarc1 = *(Arc **) i;
141 Arc *jarc2 = *(Arc **) j;
142
143 int v1 = (jarc1->getitail() ? 0 : (jarc1->pwlArc->npts - 1));
144 int v2 = (jarc2->getitail() ? 0 : (jarc2->pwlArc->npts - 1));
145
146 REAL diff = jarc1->pwlArc->pts[v1].param[0] -
147 jarc2->pwlArc->pts[v2].param[0];
148
149 if( diff < 0.0)
150 return 1;
151 else if( diff > 0.0)
152 return -1;
153 else {
154 if( v1 == 0 ) {
155 if (jarc2->tail()[1] < jarc1->tail()[1]) {
156 return subdivider.ccwTurn_tl( jarc2, jarc1 ) ? 1 : -1;
157 } else {
158 return subdivider.ccwTurn_tr( jarc2, jarc1 ) ? -1 : 1;
159 }
160 } else {
161 if( jarc2->head()[1] < jarc1->head()[1] ) {
162 return subdivider.ccwTurn_tl( jarc1, jarc2 ) ? -1 : 1;
163 } else {
164 return subdivider.ccwTurn_tr( jarc1, jarc2 ) ? 1 : -1;
165 }
166 }
167 }
168}
Subdivider & subdivider
Definition: arcsorter.h:50
Definition: arc.h:55
int getitail()
Definition: arc.h:97
REAL * tail()
Definition: arc.h:88
REAL * head()
Definition: arc.h:89
PwlArc * pwlArc
Definition: arc.h:65
int npts
Definition: pwlarc.h:47
TrimVertex * pts
Definition: pwlarc.h:46
int ccwTurn_tl(Arc_ptr, Arc_ptr)
Definition: ccw.cc:396
int ccwTurn_tr(Arc_ptr, Arc_ptr)
Definition: ccw.cc:283
REAL param[2]
Definition: trimvertex.h:45
float REAL
Definition: types.h:41
GLfloat GLfloat v1
Definition: glext.h:6062
GLfloat GLfloat GLfloat v2
Definition: glext.h:6063
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250

The documentation for this class was generated from the following files: