ReactOS 0.4.15-dev-8096-ga0eec98
OpenGLCurveEvaluator Class Reference

#include <glcurveval.h>

Inheritance diagram for OpenGLCurveEvaluator:
Collaboration diagram for OpenGLCurveEvaluator:

Public Member Functions

 OpenGLCurveEvaluator (void)
 
virtual ~OpenGLCurveEvaluator (void)
 
void range1f (long, REAL *, REAL *)
 
void domain1f (REAL, REAL)
 
void addMap (CurveMap *)
 
void enable (long)
 
void disable (long)
 
void bgnmap1f (long)
 
void map1f (long, REAL, REAL, long, long, REAL *)
 
void mapgrid1f (long, REAL, REAL)
 
void mapmesh1f (long, long, long)
 
void evalpoint1i (long)
 
void evalcoord1f (long, REAL)
 
void endmap1f (void)
 
void bgnline (void)
 
void endline (void)
 
void put_vertices_call_back (int flag)
 
void putCallBack (GLenum which, _GLUfuncptr fn)
 
void set_callback_userData (void *data)
 
void inMap1f (int which, int dimension, REAL ulower, REAL uupper, int ustride, int uorder, REAL *ctlpoints)
 
void inPreEvaluate (int order, REAL vprime, REAL *coeff)
 
void inDoDomain1 (curveEvalMachine *em, REAL u, REAL *retPoint)
 
void inDoEvalCoord1 (REAL u)
 
void inMapMesh1f (int umin, int umax)
 
 void (GLAPIENTRY *beginCallBackN)(GLenum type)
 
 void (GLAPIENTRY *endCallBackN)(void)
 
 void (GLAPIENTRY *vertexCallBackN)(const GLfloat *vert)
 
 void (GLAPIENTRY *normalCallBackN)(const GLfloat *normal)
 
 void (GLAPIENTRY *colorCallBackN)(const GLfloat *color)
 
 void (GLAPIENTRY *texcoordCallBackN)(const GLfloat *texcoord)
 
 void (GLAPIENTRY *beginCallBackData)(GLenum type
 
 void (GLAPIENTRY *endCallBackData)(void *data)
 
 void (GLAPIENTRY *vertexCallBackData)(const GLfloat *vert
 
 void (GLAPIENTRY *normalCallBackData)(const GLfloat *normal
 
 void (GLAPIENTRY *colorCallBackData)(const GLfloat *color
 
 void (GLAPIENTRY *texcoordCallBackData)(const GLfloat *texcoord
 
void beginCallBack (GLenum type, void *data)
 
void endCallBack (void *data)
 
void vertexCallBack (const GLfloat *vert, void *data)
 
void normalCallBack (const GLfloat *normal, void *data)
 
void colorCallBack (const GLfloat *color, void *data)
 
void texcoordCallBack (const GLfloat *texcoord, void *data)
 
- Public Member Functions inherited from BasicCurveEvaluator
virtual ~BasicCurveEvaluator ()
 
virtual void domain1f (REAL, REAL)
 
virtual void range1f (long, REAL *, REAL *)
 
virtual void enable (long)
 
virtual void disable (long)
 
virtual void bgnmap1f (long)
 
virtual void map1f (long, REAL, REAL, long, long, REAL *)
 
virtual void mapgrid1f (long, REAL, REAL)
 
virtual void mapmesh1f (long, long, long)
 
virtual void evalcoord1f (long, REAL)
 
virtual void endmap1f (void)
 
virtual void bgnline (void)
 
virtual void endline (void)
 
- Public Member Functions inherited from CachingEvaluator
virtual ~CachingEvaluator ()
 
virtual int canRecord (void)
 
virtual int canPlayAndRecord (void)
 
virtual int createHandle (int handle)
 
virtual void beginOutput (ServiceMode, int handle)
 
virtual void endOutput (void)
 
virtual void discardRecording (int handle)
 
virtual void playRecording (int handle)
 

Public Attributes

curveEvalMachine em_vertex
 
curveEvalMachine em_normal
 
curveEvalMachine em_color
 
curveEvalMachine em_texcoord
 
int vertex_flag
 
int normal_flag
 
int color_flag
 
int texcoord_flag
 
REAL global_grid_u0
 
REAL global_grid_u1
 
int global_grid_nu
 
voiddata
 
voiduserData
 

Private Attributes

int output_triangles
 

Additional Inherited Members

- Public Types inherited from CachingEvaluator
enum  ServiceMode { play , record , playAndRecord }
 

Detailed Description

Definition at line 66 of file glcurveval.h.

Constructor & Destructor Documentation

◆ OpenGLCurveEvaluator()

OpenGLCurveEvaluator::OpenGLCurveEvaluator ( void  )

Definition at line 48 of file glcurveval.cc.

49{
50 //no default callback functions
51 beginCallBackN = NULL;
52 endCallBackN = NULL;
53 vertexCallBackN = NULL;
54 normalCallBackN = NULL;
55 colorCallBackN = NULL;
56 texcoordCallBackN = NULL;
57 beginCallBackData = NULL;
58 endCallBackData = NULL;
59 vertexCallBackData = NULL;
60 normalCallBackData = NULL;
61 colorCallBackData = NULL;
62 texcoordCallBackData = NULL;
63
64 userData = NULL;
65
66 vertex_flag = 0;
67 normal_flag = 0;
68 color_flag = 0;
69 texcoord_flag = 0;
70
71 em_vertex.uprime = -1.0;
72 em_normal.uprime = -1.0;
73 em_color.uprime = -1.0;
74 em_texcoord.uprime = -1.0;
75 output_triangles = 0; // don't output triangles by default
76}
curveEvalMachine em_color
Definition: glcurveval.h:104
curveEvalMachine em_texcoord
Definition: glcurveval.h:105
curveEvalMachine em_vertex
Definition: glcurveval.h:102
curveEvalMachine em_normal
Definition: glcurveval.h:103
#define NULL
Definition: types.h:112

◆ ~OpenGLCurveEvaluator()

OpenGLCurveEvaluator::~OpenGLCurveEvaluator ( void  )
virtual

Definition at line 78 of file glcurveval.cc.

79{
80}

Member Function Documentation

◆ addMap()

void OpenGLCurveEvaluator::addMap ( CurveMap *  m)

Definition at line 84 of file glcurveval.cc.

85{
86 m = m;
87}
const GLfloat * m
Definition: glext.h:10848

◆ beginCallBack()

void OpenGLCurveEvaluator::beginCallBack ( GLenum  type,
void data 
)

Definition at line 350 of file glcurveval.cc.

351{
352 if(beginCallBackData)
353 beginCallBackData(which, data);
354 else if(beginCallBackN)
355 beginCallBackN(which);
356}
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static GLenum which
Definition: wgl_font.c:159

Referenced by bgnline().

◆ bgnline()

void OpenGLCurveEvaluator::bgnline ( void  )
virtual

Reimplemented from BasicCurveEvaluator.

Definition at line 105 of file glcurveval.cc.

106{
109 else
111}
void beginCallBack(GLenum type, void *data)
Definition: glcurveval.cc:350
#define GL_LINE_STRIP
Definition: gl.h:193
unsigned int GLenum
Definition: gl.h:150
GLAPI void GLAPIENTRY glBegin(GLenum mode)

Referenced by inMapMesh1f().

◆ bgnmap1f()

void OpenGLCurveEvaluator::bgnmap1f ( long  )
virtual

Reimplemented from BasicCurveEvaluator.

Definition at line 164 of file glcurveval.cc.

165{
167 {
168 //initialized so that no maps are set initially
169 vertex_flag = 0;
170 normal_flag = 0;
171 color_flag = 0;
172 texcoord_flag = 0;
173 //no need to worry about gl states when doing callback
174 }
175 else
177}
unsigned int GLbitfield
Definition: gl.h:152
GLAPI void GLAPIENTRY glPushAttrib(GLbitfield mask)
#define GL_EVAL_BIT
Definition: gl.h:718

◆ colorCallBack()

void OpenGLCurveEvaluator::colorCallBack ( const GLfloat color,
void data 
)

Definition at line 387 of file glcurveval.cc.

388{
389 if(colorCallBackData)
390 colorCallBackData(color, data);
391 else if(colorCallBackN)
392 colorCallBackN(color);
393}
GLuint color
Definition: glext.h:6243

Referenced by inDoEvalCoord1().

◆ disable()

void OpenGLCurveEvaluator::disable ( long  type)
virtual

Reimplemented from BasicCurveEvaluator.

Definition at line 127 of file glcurveval.cc.

128{
130}
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLAPI void GLAPIENTRY glDisable(GLenum cap)

◆ domain1f()

void OpenGLCurveEvaluator::domain1f ( REAL  ulo,
REAL  uhi 
)
virtual

Reimplemented from BasicCurveEvaluator.

Definition at line 98 of file glcurveval.cc.

99{
100 ulo = ulo;
101 uhi = uhi;
102}

◆ enable()

void OpenGLCurveEvaluator::enable ( long  type)
virtual

Reimplemented from BasicCurveEvaluator.

Definition at line 137 of file glcurveval.cc.

138{
140}
GLAPI void GLAPIENTRY glEnable(GLenum cap)

◆ endCallBack()

void OpenGLCurveEvaluator::endCallBack ( void data)

Definition at line 359 of file glcurveval.cc.

360{
361 if(endCallBackData)
362 endCallBackData(data);
363 else if(endCallBackN)
364 endCallBackN();
365}

Referenced by endline().

◆ endline()

void OpenGLCurveEvaluator::endline ( void  )
virtual

Reimplemented from BasicCurveEvaluator.

Definition at line 114 of file glcurveval.cc.

115{
118 else
119 glEnd();
120}
void endCallBack(void *data)
Definition: glcurveval.cc:359
GLAPI void GLAPIENTRY glEnd(void)

Referenced by inMapMesh1f().

◆ endmap1f()

void OpenGLCurveEvaluator::endmap1f ( void  )
virtual

Reimplemented from BasicCurveEvaluator.

Definition at line 184 of file glcurveval.cc.

185{
187 {
188
189 }
190 else
191 glPopAttrib();
192}
GLAPI void GLAPIENTRY glPopAttrib(void)

◆ evalcoord1f()

void OpenGLCurveEvaluator::evalcoord1f ( long  ,
REAL  u 
)
virtual

Reimplemented from BasicCurveEvaluator.

Definition at line 296 of file glcurveval.cc.

297{
299}
float GLfloat
Definition: gl.h:161
GLAPI void GLAPIENTRY glEvalCoord1f(GLfloat u)
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 * u
Definition: glfuncs.h:240

◆ evalpoint1i()

void OpenGLCurveEvaluator::evalpoint1i ( long  i)

Definition at line 287 of file glcurveval.cc.

288{
290}
GLAPI void GLAPIENTRY glEvalPoint1(GLint i)
int GLint
Definition: gl.h:156
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

◆ inDoDomain1()

void OpenGLCurveEvaluator::inDoDomain1 ( curveEvalMachine em,
REAL  u,
REAL retPoint 
)

Definition at line 136 of file incurveeval.cc.

137{
138 int j, row;
139 REAL the_uprime;
140 REAL *data;
141
142 if(em->u2 == em->u1)
143 return;
144 the_uprime = (u-em->u1) / (em->u2-em->u1);
145 /*use already cached values if possible*/
146 if(em->uprime != the_uprime){
147 inPreEvaluate(em->uorder, the_uprime, em->ucoeff);
148 em->uprime = the_uprime;
149 }
150
151 for(j=0; j<em->k; j++){
152 data = em->ctlpoints+j;
153 retPoint[j] = 0.0;
154 for(row=0; row<em->uorder; row++)
155 {
156 retPoint[j] += em->ucoeff[row] * (*data);
157 data += em->k;
158 }
159 }
160}
void inPreEvaluate(int order, REAL vprime, REAL *coeff)
Definition: incurveeval.cc:57
float REAL
Definition: types.h:41
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
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
REAL ucoeff[IN_MAX_BEZIER_ORDER]
Definition: glcurveval.h:63
REAL ctlpoints[IN_MAX_BEZIER_ORDER *IN_MAX_DIMENSION]
Definition: glcurveval.h:62

Referenced by inDoEvalCoord1().

◆ inDoEvalCoord1()

void OpenGLCurveEvaluator::inDoEvalCoord1 ( REAL  u)

Definition at line 162 of file incurveeval.cc.

163{
164 REAL temp_vertex[4];
165 REAL temp_normal[3];
166 REAL temp_color[4];
167 REAL temp_texcoord[4];
168 if(texcoord_flag) //there is a texture map
169 {
170 inDoDomain1(&em_texcoord, u, temp_texcoord);
171 texcoordCallBack(temp_texcoord, userData);
172 }
173#ifdef DEBUG
174printf("color_flag = %i\n", color_flag);
175#endif
176 if(color_flag) //there is a color map
177 {
178 inDoDomain1(&em_color, u, temp_color);
179 colorCallBack(temp_color, userData);
180 }
181 if(normal_flag) //there is a normal map
182 {
183 inDoDomain1(&em_normal, u, temp_normal);
184 normalCallBack(temp_normal, userData);
185 }
186 if(vertex_flag)
187 {
188 inDoDomain1(&em_vertex, u, temp_vertex);
189 vertexCallBack(temp_vertex, userData);
190 }
191}
void inDoDomain1(curveEvalMachine *em, REAL u, REAL *retPoint)
Definition: incurveeval.cc:136
void normalCallBack(const GLfloat *normal, void *data)
Definition: glcurveval.cc:378
void colorCallBack(const GLfloat *color, void *data)
Definition: glcurveval.cc:387
void texcoordCallBack(const GLfloat *texcoord, void *data)
Definition: glcurveval.cc:396
void vertexCallBack(const GLfloat *vert, void *data)
Definition: glcurveval.cc:368
#define printf
Definition: freeldr.h:97

Referenced by inMapMesh1f().

◆ inMap1f()

void OpenGLCurveEvaluator::inMap1f ( int  which,
int  dimension,
REAL  ulower,
REAL  uupper,
int  ustride,
int  uorder,
REAL ctlpoints 
)

Definition at line 90 of file incurveeval.cc.

97{
98 int i,x;
99 curveEvalMachine *temp_em;
100 switch(which){
101 case 0: //vertex
102 vertex_flag = 1;
103 temp_em = &em_vertex;
104 break;
105 case 1: //normal
106 normal_flag = 1;
107 temp_em = &em_normal;
108 break;
109 case 2: //color
110 color_flag = 1;
111 temp_em = &em_color;
112 break;
113 default:
114 texcoord_flag = 1;
115 temp_em = &em_texcoord;
116 break;
117 }
118
119 REAL *data = temp_em->ctlpoints;
120 temp_em->uprime = -1; //initialized
121 temp_em->k = k;
122 temp_em->u1 = ulower;
123 temp_em->u2 = uupper;
124 temp_em->ustride = ustride;
125 temp_em->uorder = uorder;
126 /*copy the control points*/
127 for(i=0; i<uorder; i++){
128 for(x=0; x<k; x++){
129 data[x] = ctlpoints[x];
130 }
131 ctlpoints += ustride;
132 data += k;
133 }
134}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLdouble GLdouble GLint ustride
Definition: glext.h:8308
GLdouble GLdouble GLint GLint uorder
Definition: glext.h:8308
int k
Definition: mpi.c:3369

Referenced by map1f().

◆ inMapMesh1f()

void OpenGLCurveEvaluator::inMapMesh1f ( int  umin,
int  umax 
)

Definition at line 193 of file incurveeval.cc.

194{
195 REAL du, u;
196 int i;
197 if(global_grid_nu == 0)
198 return; //no points to output
200 bgnline();
201 for(i=umin; i<= umax; i++){
204 }
205 endline();
206}
void inDoEvalCoord1(REAL u)
Definition: incurveeval.cc:162

Referenced by mapmesh1f().

◆ inPreEvaluate()

void OpenGLCurveEvaluator::inPreEvaluate ( int  order,
REAL  vprime,
REAL coeff 
)

Definition at line 57 of file incurveeval.cc.

58{
59 int i, j;
60 REAL oldval, temp;
61 REAL oneMinusvprime;
62
63 /*
64 * Minor optimization
65 * Compute orders 1 and 2 outright, and set coeff[0], coeff[1] to
66 * their i==1 loop values to avoid the initialization and the i==1 loop.
67 */
68 if (order == 1) {
69 coeff[0] = 1.0;
70 return;
71 }
72
73 oneMinusvprime = 1-vprime;
74 coeff[0] = oneMinusvprime;
75 coeff[1] = vprime;
76 if (order == 2) return;
77
78 for (i = 2; i < order; i++) {
79 oldval = coeff[0] * vprime;
80 coeff[0] = oneMinusvprime * coeff[0];
81 for (j = 1; j < i; j++) {
82 temp = oldval;
83 oldval = coeff[j] * vprime;
84 coeff[j] = temp + oneMinusvprime * coeff[j];
85 }
86 coeff[j] = oldval;
87 }
88}
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
static calc_node_t temp
Definition: rpn_ieee.c:38

Referenced by inDoDomain1().

◆ map1f()

void OpenGLCurveEvaluator::map1f ( long  type,
REAL  ulo,
REAL  uhi,
long  stride,
long  order,
REAL pts 
)
virtual

Reimplemented from BasicCurveEvaluator.

Definition at line 199 of file glcurveval.cc.

207{
209 {
210 int dimension = 0;
211 int which = 0;
212 switch(type){
213 case GL_MAP1_VERTEX_3:
214 which = 0;
215 dimension = 3;
216 break;
217 case GL_MAP1_VERTEX_4:
218 which=0;
219 dimension = 4;
220 break;
221 case GL_MAP1_INDEX:
222 which=2;
223 dimension = 1;
224 break;
225 case GL_MAP1_COLOR_4:
226 which=2;
227 dimension = 4;
228 break;
229 case GL_MAP1_NORMAL:
230 which=1;
231 dimension = 3;
232 break;
234 which=3;
235 dimension = 1;
236 break;
238 which=3;
239 dimension = 2;
240 break;
241
243 which=3;
244 dimension = 3;
245 break;
247 which=3;
248 dimension = 4;
249 break;
250 }
251 inMap1f(which, dimension, ulo, uhi, stride, order, pts);
252 }
253 else
254 glMap1f((GLenum) type, (GLfloat) ulo, (GLfloat) uhi, (GLint) stride,
255 (GLint) order, (const GLfloat *) pts);
256}
void inMap1f(int which, int dimension, REAL ulower, REAL uupper, int ustride, int uorder, REAL *ctlpoints)
Definition: incurveeval.cc:90
#define GL_MAP1_TEXTURE_COORD_3
Definition: gl.h:556
#define GL_MAP1_VERTEX_3
Definition: gl.h:558
#define GL_MAP1_TEXTURE_COORD_2
Definition: gl.h:555
GLAPI void GLAPIENTRY glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)
#define GL_MAP1_TEXTURE_COORD_1
Definition: gl.h:554
#define GL_MAP1_INDEX
Definition: gl.h:552
#define GL_MAP1_TEXTURE_COORD_4
Definition: gl.h:557
#define GL_MAP1_COLOR_4
Definition: gl.h:551
#define GL_MAP1_NORMAL
Definition: gl.h:553
#define GL_MAP1_VERTEX_4
Definition: gl.h:559
GLsizei stride
Definition: glext.h:5848

◆ mapgrid1f()

void OpenGLCurveEvaluator::mapgrid1f ( long  nu,
REAL  u0,
REAL  u1 
)
virtual

Reimplemented from BasicCurveEvaluator.

Definition at line 147 of file glcurveval.cc.

148{
150 {
151 global_grid_u0 = u0;
153 global_grid_nu = (int) nu;
154 }
155 else
156 glMapGrid1f((GLint) nu, (GLfloat) u0, (GLfloat) u1);
157}
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
GLAPI void GLAPIENTRY glMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
GLdouble u1
Definition: glext.h:8308

◆ mapmesh1f()

void OpenGLCurveEvaluator::mapmesh1f ( long  style,
long  from,
long  to 
)
virtual

Reimplemented from BasicCurveEvaluator.

Definition at line 262 of file glcurveval.cc.

263{
265 {
266 inMapMesh1f((int) from, (int) to);
267 }
268 else
269 {
270 switch(style) {
271 default:
272 case N_MESHFILL:
273 case N_MESHLINE:
275 break;
276 case N_MESHPOINT:
278 break;
279 }
280 }
281}
Arabic default style
Definition: afstyles.h:94
void inMapMesh1f(int umin, int umax)
Definition: incurveeval.cc:193
#define N_MESHFILL
Definition: displaymode.h:36
#define N_MESHLINE
Definition: displaymode.h:37
#define N_MESHPOINT
Definition: displaymode.h:38
#define GL_POINT
Definition: gl.h:265
#define GL_LINE
Definition: gl.h:266
GLAPI void GLAPIENTRY glEvalMesh1(GLenum mode, GLint i1, GLint i2)
CardRegion * from
Definition: spigame.cpp:19

◆ normalCallBack()

void OpenGLCurveEvaluator::normalCallBack ( const GLfloat normal,
void data 
)

Definition at line 378 of file glcurveval.cc.

379{
380 if(normalCallBackData)
381 normalCallBackData(normal, data);
382 else if(normalCallBackN)
383 normalCallBackN(normal);
384}
@ normal
Definition: optimize.h:166

Referenced by inDoEvalCoord1().

◆ put_vertices_call_back()

void OpenGLCurveEvaluator::put_vertices_call_back ( int  flag)
inline

Definition at line 87 of file glcurveval.h.

88 {
90 }
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 flag
Definition: glfuncs.h:52

Referenced by GLUnurbs::put_callbackFlag().

◆ putCallBack()

void OpenGLCurveEvaluator::putCallBack ( GLenum  which,
_GLUfuncptr  fn 
)

Definition at line 305 of file glcurveval.cc.

307{
308 switch(which)
309 {
310 case GLU_NURBS_BEGIN:
311 beginCallBackN = (void (GLAPIENTRY *) (GLenum)) fn;
312 break;
313 case GLU_NURBS_END:
314 endCallBackN = (void (GLAPIENTRY *) (void)) fn;
315 break;
316 case GLU_NURBS_VERTEX:
317 vertexCallBackN = (void (GLAPIENTRY *) (const GLfloat*)) fn;
318 break;
319 case GLU_NURBS_NORMAL:
320 normalCallBackN = (void (GLAPIENTRY *) (const GLfloat*)) fn;
321 break;
322 case GLU_NURBS_COLOR:
323 colorCallBackN = (void (GLAPIENTRY *) (const GLfloat*)) fn;
324 break;
326 texcoordCallBackN = (void (GLAPIENTRY *) (const GLfloat*)) fn;
327 break;
329 beginCallBackData = (void (GLAPIENTRY *) (GLenum, void*)) fn;
330 break;
332 endCallBackData = (void (GLAPIENTRY *) (void*)) fn;
333 break;
335 vertexCallBackData = (void (GLAPIENTRY *) (const GLfloat*, void*)) fn;
336 break;
338 normalCallBackData = (void (GLAPIENTRY *) (const GLfloat*, void*)) fn;
339 break;
341 colorCallBackData = (void (GLAPIENTRY *) (const GLfloat*, void*)) fn;
342 break;
344 texcoordCallBackData = (void (GLAPIENTRY *) (const GLfloat*, void*)) fn;
345 break;
346 }
347}
#define GLU_NURBS_END
Definition: glu.h:112
#define GLU_NURBS_NORMAL
Definition: glu.h:106
#define GLU_NURBS_COLOR
Definition: glu.h:108
#define GLU_NURBS_TEXTURE_COORD
Definition: glu.h:110
#define GLU_NURBS_VERTEX_DATA
Definition: glu.h:116
#define GLU_NURBS_TEXTURE_COORD_DATA
Definition: glu.h:122
#define GLU_NURBS_VERTEX
Definition: glu.h:104
#define GLAPIENTRY
Definition: glu.h:44
#define GLU_NURBS_COLOR_DATA
Definition: glu.h:120
#define GLU_NURBS_BEGIN_DATA
Definition: glu.h:114
#define GLU_NURBS_END_DATA
Definition: glu.h:124
#define GLU_NURBS_BEGIN
Definition: glu.h:102
#define GLU_NURBS_NORMAL_DATA
Definition: glu.h:118
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159

Referenced by GLUnurbs::putSurfCallBack().

◆ range1f()

void OpenGLCurveEvaluator::range1f ( long  type,
REAL from,
REAL to 
)
virtual

Reimplemented from BasicCurveEvaluator.

Definition at line 90 of file glcurveval.cc.

91{
92 type = type;
93 from = from;
94 to = to;
95}

◆ set_callback_userData()

void OpenGLCurveEvaluator::set_callback_userData ( void data)
inline

Definition at line 96 of file glcurveval.h.

97 {
98 userData = data;
99 }

Referenced by GLUnurbs::setNurbsCallbackData().

◆ texcoordCallBack()

void OpenGLCurveEvaluator::texcoordCallBack ( const GLfloat texcoord,
void data 
)

Definition at line 396 of file glcurveval.cc.

397{
398 if(texcoordCallBackData)
399 texcoordCallBackData(texcoord, data);
400 else if(texcoordCallBackN)
401 texcoordCallBackN(texcoord);
402}

Referenced by inDoEvalCoord1().

◆ vertexCallBack()

void OpenGLCurveEvaluator::vertexCallBack ( const GLfloat vert,
void data 
)

Definition at line 368 of file glcurveval.cc.

369{
370 if(vertexCallBackData)
371 vertexCallBackData(vert, data);
372 else if(vertexCallBackN)
373 vertexCallBackN(vert);
374}

Referenced by inDoEvalCoord1().

◆ void() [1/12]

OpenGLCurveEvaluator::void ( GLAPIENTRY beginCallBackData)

◆ void() [2/12]

OpenGLCurveEvaluator::void ( GLAPIENTRY beginCallBackN)

◆ void() [3/12]

OpenGLCurveEvaluator::void ( GLAPIENTRY colorCallBackData) const

◆ void() [4/12]

OpenGLCurveEvaluator::void ( GLAPIENTRY colorCallBackN) const

◆ void() [5/12]

OpenGLCurveEvaluator::void ( GLAPIENTRY endCallBackData)

◆ void() [6/12]

OpenGLCurveEvaluator::void ( GLAPIENTRY endCallBackN)

◆ void() [7/12]

OpenGLCurveEvaluator::void ( GLAPIENTRY normalCallBackData) const

◆ void() [8/12]

OpenGLCurveEvaluator::void ( GLAPIENTRY normalCallBackN) const

◆ void() [9/12]

OpenGLCurveEvaluator::void ( GLAPIENTRY texcoordCallBackData) const

◆ void() [10/12]

OpenGLCurveEvaluator::void ( GLAPIENTRY texcoordCallBackN) const

◆ void() [11/12]

OpenGLCurveEvaluator::void ( GLAPIENTRY vertexCallBackData) const

◆ void() [12/12]

OpenGLCurveEvaluator::void ( GLAPIENTRY vertexCallBackN) const

Member Data Documentation

◆ color_flag

int OpenGLCurveEvaluator::color_flag

Definition at line 108 of file glcurveval.h.

Referenced by bgnmap1f(), inDoEvalCoord1(), inMap1f(), and OpenGLCurveEvaluator().

◆ data

void * OpenGLCurveEvaluator::data

Definition at line 135 of file glcurveval.h.

Referenced by inDoDomain1(), and set_callback_userData().

◆ em_color

curveEvalMachine OpenGLCurveEvaluator::em_color

Definition at line 104 of file glcurveval.h.

Referenced by inDoEvalCoord1(), inMap1f(), and OpenGLCurveEvaluator().

◆ em_normal

curveEvalMachine OpenGLCurveEvaluator::em_normal

Definition at line 103 of file glcurveval.h.

Referenced by inDoEvalCoord1(), inMap1f(), and OpenGLCurveEvaluator().

◆ em_texcoord

curveEvalMachine OpenGLCurveEvaluator::em_texcoord

Definition at line 105 of file glcurveval.h.

Referenced by inDoEvalCoord1(), inMap1f(), and OpenGLCurveEvaluator().

◆ em_vertex

curveEvalMachine OpenGLCurveEvaluator::em_vertex

Definition at line 102 of file glcurveval.h.

Referenced by inDoEvalCoord1(), inMap1f(), and OpenGLCurveEvaluator().

◆ global_grid_nu

int OpenGLCurveEvaluator::global_grid_nu

Definition at line 113 of file glcurveval.h.

Referenced by inMapMesh1f(), and mapgrid1f().

◆ global_grid_u0

REAL OpenGLCurveEvaluator::global_grid_u0

Definition at line 111 of file glcurveval.h.

Referenced by inMapMesh1f(), and mapgrid1f().

◆ global_grid_u1

REAL OpenGLCurveEvaluator::global_grid_u1

Definition at line 112 of file glcurveval.h.

Referenced by inMapMesh1f(), and mapgrid1f().

◆ normal_flag

int OpenGLCurveEvaluator::normal_flag

Definition at line 107 of file glcurveval.h.

Referenced by bgnmap1f(), inDoEvalCoord1(), inMap1f(), and OpenGLCurveEvaluator().

◆ output_triangles

int OpenGLCurveEvaluator::output_triangles
private

◆ texcoord_flag

int OpenGLCurveEvaluator::texcoord_flag

Definition at line 109 of file glcurveval.h.

Referenced by bgnmap1f(), inDoEvalCoord1(), inMap1f(), and OpenGLCurveEvaluator().

◆ userData

void* OpenGLCurveEvaluator::userData

◆ vertex_flag

int OpenGLCurveEvaluator::vertex_flag

Definition at line 106 of file glcurveval.h.

Referenced by bgnmap1f(), inDoEvalCoord1(), inMap1f(), and OpenGLCurveEvaluator().


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