ReactOS 0.4.15-dev-7958-gcd0bb1a
O_pwlcurve Class Reference

#include <reader.h>

Inheritance diagram for O_pwlcurve:
Collaboration diagram for O_pwlcurve:

Public Member Functions

 O_pwlcurve (long, long, INREAL *, long, TrimVertex *)
 
- Public Member Functions inherited from PooledObj
voidoperator new (size_t, Pool &)
 
voidoperator new (size_t, void *)
 
voidoperator new (size_t s)
 
void operator delete (void *)
 
void operator delete (void *, Pool &)
 
void deleteMe (Pool &)
 

Public Attributes

TrimVertexpts
 
int npts
 
O_pwlcurvenext
 
int used
 
int save
 
O_curveowner
 

Detailed Description

Definition at line 83 of file reader.h.

Constructor & Destructor Documentation

◆ O_pwlcurve()

O_pwlcurve::O_pwlcurve ( long  _type,
long  count,
INREAL array,
long  byte_stride,
TrimVertex trimpts 
)

Definition at line 60 of file reader.cc.

61{
62 next = 0;
63 used = 0;
64 owner = 0;
65 pts = trimpts;
66 npts = (int) count;
67 save = 0;
68 int i;
69
70 /* copy user data into internal trimming data structures */
71 switch( _type ) {
72 case N_P2D: {
73 TrimVertex *v = pts;
74 TrimVertex *prev = NULL;
75 int num = 0;
76 int doit;
77 for(i=0; i<count; i++) {
78 doit = 1;
79 if(prev != NULL)
80 {
81 if(equal(prev->param[0], array[0]) && equal(prev->param[1], array[1]))
82 {
83 doit = 0;
84 }
85 }
86
87 if(doit)
88 {
89 v->param[0] = (REAL) array[0];
90 v->param[1] = (REAL) array[1];
91 prev = v;
92 v++;
93 num++;
94 }
95 array = (INREAL *) (((char *) array) + byte_stride);
96 }
97 npts = num;
98 break;
99 }
100 case N_P2DR: {
101 TrimVertex *v = pts;
102 for( TrimVertex *lastv = v + count; v != lastv; v++ ) {
103 v->param[0] = (REAL) array[0] / (REAL) array[2];
104 v->param[1] = (REAL) array[1] / (REAL) array[2];
105 array = (INREAL *) (((char *) array) + byte_stride);
106 }
107 break;
108 }
109 }
110}
int used
Definition: reader.h:88
O_curve * owner
Definition: reader.h:90
int save
Definition: reader.h:89
int npts
Definition: reader.h:86
TrimVertex * pts
Definition: reader.h:85
O_pwlcurve * next
Definition: reader.h:87
REAL param[2]
Definition: trimvertex.h:45
#define NULL
Definition: types.h:112
#define INREAL
Definition: types.h:40
float REAL
Definition: types.h:41
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
#define doit(a, b)
Definition: fieldoff.c:4
const GLdouble * v
Definition: gl.h:2040
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLuint GLuint num
Definition: glext.h:9618
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
#define N_P2D
Definition: nurbsconsts.h:116
#define N_P2DR
Definition: nurbsconsts.h:117
#define equal(x, y)
Definition: reader.cc:56

Member Data Documentation

◆ next

O_pwlcurve* O_pwlcurve::next

◆ npts

int O_pwlcurve::npts

Definition at line 86 of file reader.h.

Referenced by O_pwlcurve(), and o_pwlcurve_to_DLines().

◆ owner

O_curve* O_pwlcurve::owner

Definition at line 90 of file reader.h.

Referenced by NurbsTessellator::do_pwlcurve(), and O_pwlcurve().

◆ pts

TrimVertex* O_pwlcurve::pts

Definition at line 85 of file reader.h.

Referenced by O_pwlcurve(), and o_pwlcurve_to_DLines().

◆ save

int O_pwlcurve::save

◆ used

int O_pwlcurve::used

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