ReactOS  0.4.14-dev-998-g623dd26
ArcSdirSorter Class Reference

#include <arcsorter.h>

Inheritance diagram for ArcSdirSorter:
Collaboration diagram for ArcSdirSorter:

Public Member Functions

 ArcSdirSorter (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

- Protected Attributes inherited from ArcSorter
Subdividersubdivider
 

Detailed Description

Definition at line 57 of file arcsorter.h.

Constructor & Destructor Documentation

◆ ArcSdirSorter()

ArcSdirSorter::ArcSdirSorter ( Subdivider s)

Definition at line 88 of file arcsorter.cc.

88  : ArcSorter(s)
89 {
90 }
GLdouble s
Definition: gl.h:2039
ArcSorter(Subdivider &)
Definition: arcsorter.cc:48

Member Function Documentation

◆ qscmp()

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

Reimplemented from ArcSorter.

Definition at line 93 of file arcsorter.cc.

94 {
95  Arc *jarc1 = *(Arc **) i;
96  Arc *jarc2 = *(Arc **) j;
97 
98  int v1 = (jarc1->getitail() ? 0 : (jarc1->pwlArc->npts - 1));
99  int v2 = (jarc2->getitail() ? 0 : (jarc2->pwlArc->npts - 1));
100 
101  REAL diff = jarc1->pwlArc->pts[v1].param[1] -
102  jarc2->pwlArc->pts[v2].param[1];
103 
104  if( diff < 0.0)
105  return -1;
106  else if( diff > 0.0)
107  return 1;
108  else {
109  if( v1 == 0 ) {
110  if( jarc2->tail()[0] < jarc1->tail()[0] ) {
111  return subdivider.ccwTurn_sl( jarc2, jarc1 ) ? 1 : -1;
112  } else {
113  return subdivider.ccwTurn_sr( jarc2, jarc1 ) ? -1 : 1;
114  }
115  } else {
116  if( jarc2->head()[0] < jarc1->head()[0] ) {
117  return subdivider.ccwTurn_sl( jarc1, jarc2 ) ? -1 : 1;
118  } else {
119  return subdivider.ccwTurn_sr( jarc1, jarc2 ) ? 1 : -1;
120  }
121  }
122  }
123 }
int npts
Definition: pwlarc.h:47
REAL * tail()
Definition: arc.h:88
Subdivider & subdivider
Definition: arcsorter.h:50
Definition: arc.h:55
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
int ccwTurn_sl(Arc_ptr, Arc_ptr)
Definition: ccw.cc:170
int ccwTurn_sr(Arc_ptr, Arc_ptr)
Definition: ccw.cc:57
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
PwlArc * pwlArc
Definition: arc.h:65
GLfloat GLfloat GLfloat v2
Definition: glext.h:6063
int getitail()
Definition: arc.h:97
REAL param[2]
Definition: trimvertex.h:45
float REAL
Definition: types.h:41
REAL * head()
Definition: arc.h:89
TrimVertex * pts
Definition: pwlarc.h:46
GLfloat GLfloat v1
Definition: glext.h:6062

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