ReactOS  0.4.14-dev-1233-gf5658fd
Flist Class Reference

#include <flist.h>

Collaboration diagram for Flist:

Public Member Functions

 Flist (void)
 
 ~Flist (void)
 
void add (REAL x)
 
void filter (void)
 
void grow (int)
 
void taper (REAL, REAL)
 

Public Attributes

REALpts
 
int npts
 
int start
 
int end
 

Protected Attributes

FlistSorter sorter
 

Detailed Description

Definition at line 42 of file flist.h.

Constructor & Destructor Documentation

◆ Flist()

Flist::Flist ( void  )

Definition at line 49 of file flist.cc.

50 {
51  npts = 0;
52  pts = 0;
53  start = end = 0;
54 }
int npts
Definition: flist.h:45
REAL * pts
Definition: flist.h:44
GLuint GLuint end
Definition: gl.h:1545
GLuint start
Definition: gl.h:1545

◆ ~Flist()

Flist::~Flist ( void  )

Definition at line 60 of file flist.cc.

61 {
62  if( npts ) delete[] pts;
63 }
int npts
Definition: flist.h:45
REAL * pts
Definition: flist.h:44

Member Function Documentation

◆ add()

void Flist::add ( REAL  x)

Definition at line 66 of file flist.cc.

67 {
68  pts[end++] = x;
69  assert( end <= npts );
70 }
int npts
Definition: flist.h:45
REAL * pts
Definition: flist.h:44
#define assert(x)
Definition: debug.h:53
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLuint GLuint end
Definition: gl.h:1545

Referenced by Subdivider::findIrregularS(), and Subdivider::findIrregularT().

◆ filter()

void Flist::filter ( void  )

Definition at line 76 of file flist.cc.

77 {
78  sorter.qsort( pts, end );
79  start = 0;
80 
81  int j = 0;
82  for( int i = 1; i < end; i++ ) {
83  if( pts[i] == pts[i-j-1] )
84  j++;
85  pts[i-j] = pts[i];
86  }
87  end -= j;
88 }
REAL * pts
Definition: flist.h:44
FlistSorter sorter
Definition: flist.h:56
GLuint GLuint end
Definition: gl.h:1545
void qsort(REAL *a, int n)
Definition: flistsorter.cc:48
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
GLuint start
Definition: gl.h:1545
int end
Definition: flist.h:47

Referenced by Subdivider::findIrregularS(), and Subdivider::findIrregularT().

◆ grow()

void Flist::grow ( int  maxpts)

Definition at line 94 of file flist.cc.

95 {
96  if( npts < maxpts ) {
97  if( npts ) delete[] pts;
98  npts = 2 * maxpts;
99  pts = new REAL[npts];
100  assert( pts != 0 );
101  }
102  start = end = 0;
103 }
int npts
Definition: flist.h:45
REAL * pts
Definition: flist.h:44
#define assert(x)
Definition: debug.h:53
GLuint GLuint end
Definition: gl.h:1545
GLuint start
Definition: gl.h:1545
float REAL
Definition: types.h:41

Referenced by Subdivider::findIrregularS(), and Subdivider::findIrregularT().

◆ taper()

void Flist::taper ( REAL  from,
REAL  to 
)

Definition at line 109 of file flist.cc.

110 {
111  while( pts[start] != from )
112  start++;
113 
114  while( pts[end-1] != to )
115  end--;
116 }
REAL * pts
Definition: flist.h:44
GLuint GLuint end
Definition: gl.h:1545
GLuint start
Definition: gl.h:1545
CardRegion * from
Definition: spigame.cpp:19

Member Data Documentation

◆ end

◆ npts

int Flist::npts

Definition at line 45 of file flist.h.

Referenced by add(), Flist(), grow(), and ~Flist().

◆ pts

◆ sorter

FlistSorter Flist::sorter
protected

Definition at line 56 of file flist.h.

Referenced by filter().

◆ start


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