ReactOS  0.4.15-dev-985-gd905dd5
GLUnurbs Class Reference

#include <glrenderer.h>

Inheritance diagram for GLUnurbs:
Collaboration diagram for GLUnurbs:

Public Member Functions

 GLUnurbs (void)
 
void loadGLMatrices (void)
 
void useGLMatrices (const GLfloat modelMatrix[16], const GLfloat projMatrix[16], const GLint viewport[4])
 
void setSamplingMatrixIdentity (void)
 
void errorHandler (int)
 
void bgnrender (void)
 
void endrender (void)
 
void setautoloadmode (INREAL value)
 
GLboolean getautoloadmode (void)
 
void postError (int which)
 
void putSurfCallBack (GLenum which, _GLUfuncptr fn)
 
int get_vertices_call_back ()
 
void put_vertices_call_back (int flag)
 
int get_callback_auto_normal ()
 
void put_callback_auto_normal (int flag)
 
void setNurbsCallbackData (void *userData)
 
void LOD_eval_list (int level)
 
int is_callback ()
 
void put_callbackFlag (int flag)
 
- Public Member Functions inherited from NurbsTessellator
 NurbsTessellator (BasicCurveEvaluator &c, BasicSurfaceEvaluator &e)
 
virtual ~NurbsTessellator (void)
 
void getnurbsproperty (long, INREAL *)
 
void getnurbsproperty (long, long, INREAL *)
 
void setnurbsproperty (long, INREAL)
 
void setnurbsproperty (long, long, INREAL)
 
void setnurbsproperty (long, long, INREAL *)
 
void setnurbsproperty (long, long, INREAL *, long, long)
 
virtual void makeobj (int n)
 
virtual void closeobj (void)
 
void bgnsurface (long)
 
void endsurface (void)
 
void bgntrim (void)
 
void endtrim (void)
 
void bgncurve (long)
 
void endcurve (void)
 
void pwlcurve (long, INREAL[], long, long)
 
void nurbscurve (long, INREAL[], long, INREAL[], long, long)
 
void nurbssurface (long, INREAL[], long, INREAL[], long, long, INREAL[], long, long, long)
 
void defineMap (long, long, long)
 
void redefineMaps (void)
 
void discardRecording (void *)
 
voidbeginRecording (void)
 
void endRecording (void)
 
void playRecording (void *)
 
void set_domain_distance_u_rate (REAL u_rate)
 
void set_domain_distance_v_rate (REAL v_rate)
 
void set_is_domain_distance_sampling (int flag)
 

Public Attributes

errorCallbackType errorCallback
 
- Public Attributes inherited from NurbsTessellator
Pool quiltPool
 

Private Member Functions

void loadSamplingMatrix (const GLfloat vmat[4][4], const GLint viewport[4])
 
void loadCullingMatrix (GLfloat vmat[4][4])
 

Static Private Member Functions

static void grabGLMatrix (GLfloat vmat[4][4])
 
static void transform4d (GLfloat A[4], GLfloat B[4], GLfloat mat[4][4])
 
static void multmatrix4d (GLfloat n[4][4], const GLfloat left[4][4], const GLfloat right[4][4])
 

Private Attributes

GLboolean autoloadmode
 
OpenGLSurfaceEvaluator surfaceEvaluator
 
OpenGLCurveEvaluator curveEvaluator
 
int callbackFlag
 

Additional Inherited Members

- Protected Attributes inherited from NurbsTessellator
Renderhints renderhints
 
Maplist maplist
 
Backend backend
 

Detailed Description

Definition at line 49 of file glrenderer.h.

Constructor & Destructor Documentation

◆ GLUnurbs()

GLUnurbs::GLUnurbs ( void  )

Definition at line 42 of file glrenderer.cc.

44 {
45  redefineMaps();
62  defineMap(GL_MAP2_INDEX, 0, 1);
63  defineMap(GL_MAP1_INDEX, 0, 1);
64 
69 
74 
79 
84 
85  //added for optimizing untrimmed case
87 
92 
93  //added for optimizing untrimmed case
95  set_is_domain_distance_sampling(0); //since the default is path_length
96 
97  //default autoloadmode is true
98  autoloadmode = 1;
99 
100  //default callbackFlag is 0
101  callbackFlag = 0;
102 
104 }
#define GL_MAP1_VERTEX_4
Definition: gl.h:559
#define N_SAMPLINGMETHOD
Definition: nurbsconsts.h:54
#define N_S_STEPS
Definition: nurbsconsts.h:99
#define GL_MAP1_COLOR_4
Definition: gl.h:551
#define N_ERROR_TOLERANCE
Definition: nurbsconsts.h:90
void defineMap(long, long, long)
void set_is_domain_distance_sampling(int flag)
Definition: nurbstess.cc:65
#define GL_MAP1_INDEX
Definition: gl.h:552
#define GL_MAP2_TEXTURE_COORD_1
Definition: gl.h:563
#define GL_MAP2_TEXTURE_COORD_4
Definition: gl.h:566
#define GL_MAP1_TEXTURE_COORD_2
Definition: gl.h:555
errorCallbackType errorCallback
Definition: glrenderer.h:71
void setnurbsproperty(long, INREAL)
#define N_PIXEL_TOLERANCE
Definition: nurbsconsts.h:89
NurbsTessellator(BasicCurveEvaluator &c, BasicSurfaceEvaluator &e)
#define GL_MAP2_INDEX
Definition: gl.h:561
smooth NULL
Definition: ftsmooth.c:416
#define GL_MAP2_TEXTURE_COORD_3
Definition: gl.h:565
#define GL_MAP2_VERTEX_4
Definition: gl.h:568
#define GL_MAP1_TEXTURE_COORD_3
Definition: gl.h:556
#define GL_MAP1_TEXTURE_COORD_1
Definition: gl.h:554
#define GL_MAP1_NORMAL
Definition: gl.h:553
#define GL_MAP2_NORMAL
Definition: gl.h:562
int callbackFlag
Definition: glrenderer.h:143
#define GL_MAP1_TEXTURE_COORD_4
Definition: gl.h:557
void set_domain_distance_u_rate(REAL u_rate)
Definition: nurbstess.cc:53
#define GL_MAP2_COLOR_4
Definition: gl.h:560
#define GL_MAP2_VERTEX_3
Definition: gl.h:567
OpenGLCurveEvaluator curveEvaluator
Definition: glrenderer.h:132
#define N_PATHLENGTH
Definition: nurbsconsts.h:59
#define N_T_STEPS
Definition: nurbsconsts.h:100
void set_domain_distance_v_rate(REAL v_rate)
Definition: nurbstess.cc:59
#define GL_MAP1_VERTEX_3
Definition: gl.h:558
GLboolean autoloadmode
Definition: glrenderer.h:130
void redefineMaps(void)
#define GL_MAP2_TEXTURE_COORD_2
Definition: gl.h:564
OpenGLSurfaceEvaluator surfaceEvaluator
Definition: glrenderer.h:131

Member Function Documentation

◆ bgnrender()

void GLUnurbs::bgnrender ( void  )
virtual

Reimplemented from NurbsTessellator.

Definition at line 107 of file glrenderer.cc.

108 {
109  if (autoloadmode) {
110  loadGLMatrices();
111  }
112 }
GLboolean autoloadmode
Definition: glrenderer.h:130
void loadGLMatrices(void)
Definition: glrenderer.cc:129

◆ endrender()

void GLUnurbs::endrender ( void  )
virtual

Reimplemented from NurbsTessellator.

Definition at line 115 of file glrenderer.cc.

116 {
117 }

◆ errorHandler()

void GLUnurbs::errorHandler ( int  i)
virtual

Reimplemented from NurbsTessellator.

Definition at line 120 of file glrenderer.cc.

121 {
122  int gluError;
123 
124  gluError = i + (GLU_NURBS_ERROR1 - 1);
125  postError( gluError );
126 }
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 GLU_NURBS_ERROR1
Definition: glu.h:128
void postError(int which)
Definition: glrenderer.h:72

◆ get_callback_auto_normal()

int GLUnurbs::get_callback_auto_normal ( )
inline

Definition at line 94 of file glrenderer.h.

95  {
97  }
OpenGLSurfaceEvaluator surfaceEvaluator
Definition: glrenderer.h:131

◆ get_vertices_call_back()

int GLUnurbs::get_vertices_call_back ( )
inline

Definition at line 84 of file glrenderer.h.

85  {
87  }
OpenGLSurfaceEvaluator surfaceEvaluator
Definition: glrenderer.h:131

◆ getautoloadmode()

GLboolean GLUnurbs::getautoloadmode ( void  )
inline

Definition at line 69 of file glrenderer.h.

69 { return autoloadmode; }
GLboolean autoloadmode
Definition: glrenderer.h:130

◆ grabGLMatrix()

void GLUnurbs::grabGLMatrix ( GLfloat  vmat[4][4])
staticprivate

Definition at line 159 of file glrenderer.cc.

160 {
161  GLfloat m1[4][4], m2[4][4];
162 
163  ::glGetFloatv((GLenum) GL_MODELVIEW_MATRIX, (GLfloat *) &(m1[0][0]));
164  ::glGetFloatv((GLenum) GL_PROJECTION_MATRIX, (GLfloat *) &(m2[0][0]));
165  multmatrix4d((GLfloat (*)[4]) vmat,
166  (const GLfloat (*)[4]) m1, (const GLfloat (*)[4]) m2);
167 }
GLAPI void GLAPIENTRY glGetFloatv(GLenum pname, GLfloat *params)
#define GL_PROJECTION_MATRIX
Definition: gl.h:541
#define GL_MODELVIEW_MATRIX
Definition: gl.h:538
unsigned int GLenum
Definition: gl.h:150
static void multmatrix4d(GLfloat n[4][4], const GLfloat left[4][4], const GLfloat right[4][4])
Definition: glrenderer.cc:294
float GLfloat
Definition: gl.h:161

Referenced by loadGLMatrices().

◆ is_callback()

int GLUnurbs::is_callback ( )
inline

Definition at line 118 of file glrenderer.h.

119  {
120  return callbackFlag;
121  }
int callbackFlag
Definition: glrenderer.h:143

◆ loadCullingMatrix()

void GLUnurbs::loadCullingMatrix ( GLfloat  vmat[4][4])
private

Definition at line 237 of file glrenderer.cc.

238 {
239  INREAL cmat[4][4];
240 
241  cmat[0][0] = vmat[0][0];
242  cmat[0][1] = vmat[0][1];
243  cmat[0][2] = vmat[0][2];
244  cmat[0][3] = vmat[0][3];
245 
246  cmat[1][0] = vmat[1][0];
247  cmat[1][1] = vmat[1][1];
248  cmat[1][2] = vmat[1][2];
249  cmat[1][3] = vmat[1][3];
250 
251  cmat[2][0] = vmat[2][0];
252  cmat[2][1] = vmat[2][1];
253  cmat[2][2] = vmat[2][2];
254  cmat[2][3] = vmat[2][3];
255 
256  cmat[3][0] = vmat[3][0];
257  cmat[3][1] = vmat[3][1];
258  cmat[3][2] = vmat[3][2];
259  cmat[3][3] = vmat[3][3];
260 
261  const long rstride = sizeof(cmat[0]) / sizeof(cmat[0][0]);
262  const long cstride = 1;
263 
264  setnurbsproperty(GL_MAP2_VERTEX_3, N_CULLINGMATRIX, &cmat[0][0], rstride,
265  cstride);
266  setnurbsproperty(GL_MAP2_VERTEX_4, N_CULLINGMATRIX, &cmat[0][0], rstride,
267  cstride);
268  //added for curves by zl
269  setnurbsproperty(GL_MAP1_VERTEX_3, N_CULLINGMATRIX, &cmat[0][0], rstride,
270  cstride);
271  setnurbsproperty(GL_MAP1_VERTEX_4, N_CULLINGMATRIX, &cmat[0][0], rstride,
272  cstride);
273 }
#define GL_MAP1_VERTEX_4
Definition: gl.h:559
#define N_CULLINGMATRIX
Definition: nurbsconsts.h:105
void setnurbsproperty(long, INREAL)
#define GL_MAP2_VERTEX_4
Definition: gl.h:568
#define INREAL
Definition: types.h:40
#define GL_MAP2_VERTEX_3
Definition: gl.h:567
#define GL_MAP1_VERTEX_3
Definition: gl.h:558

Referenced by loadGLMatrices(), and useGLMatrices().

◆ loadGLMatrices()

void GLUnurbs::loadGLMatrices ( void  )

Definition at line 129 of file glrenderer.cc.

130 {
131  GLfloat vmat[4][4];
132  GLint viewport[4];
133 
134  grabGLMatrix((GLfloat (*)[4]) vmat);
135  loadCullingMatrix((GLfloat (*)[4]) vmat);
136  ::glGetIntegerv((GLenum) GL_VIEWPORT, (GLint *) viewport);
137  loadSamplingMatrix((const GLfloat (*)[4]) vmat, (const GLint *) viewport);
138 }
#define GL_VIEWPORT
Definition: gl.h:547
static void grabGLMatrix(GLfloat vmat[4][4])
Definition: glrenderer.cc:159
GLAPI void GLAPIENTRY glGetIntegerv(GLenum pname, GLint *params)
void loadSamplingMatrix(const GLfloat vmat[4][4], const GLint viewport[4])
Definition: glrenderer.cc:194
unsigned int GLenum
Definition: gl.h:150
void loadCullingMatrix(GLfloat vmat[4][4])
Definition: glrenderer.cc:237
float GLfloat
Definition: gl.h:161
int GLint
Definition: gl.h:156

Referenced by bgnrender().

◆ loadSamplingMatrix()

void GLUnurbs::loadSamplingMatrix ( const GLfloat  vmat[4][4],
const GLint  viewport[4] 
)
private

Definition at line 194 of file glrenderer.cc.

196 {
197 
198  /* rescale the mapping to correspond to pixels in x/y */
199  REAL xsize = 0.5 * (REAL) (viewport[2]);
200  REAL ysize = 0.5 * (REAL) (viewport[3]);
201 
202  INREAL smat[4][4];
203  smat[0][0] = vmat[0][0] * xsize;
204  smat[1][0] = vmat[1][0] * xsize;
205  smat[2][0] = vmat[2][0] * xsize;
206  smat[3][0] = vmat[3][0] * xsize;
207 
208  smat[0][1] = vmat[0][1] * ysize;
209  smat[1][1] = vmat[1][1] * ysize;
210  smat[2][1] = vmat[2][1] * ysize;
211  smat[3][1] = vmat[3][1] * ysize;
212 
213  smat[0][2] = 0.0;
214  smat[1][2] = 0.0;
215  smat[2][2] = 0.0;
216  smat[3][2] = 0.0;
217 
218  smat[0][3] = vmat[0][3];
219  smat[1][3] = vmat[1][3];
220  smat[2][3] = vmat[2][3];
221  smat[3][3] = vmat[3][3];
222 
223  const long rstride = sizeof(smat[0]) / sizeof(smat[0][0]);
224  const long cstride = 1;
225 
226  setnurbsproperty(GL_MAP1_VERTEX_3, N_SAMPLINGMATRIX, &smat[0][0], rstride,
227  cstride);
228  setnurbsproperty(GL_MAP1_VERTEX_4, N_SAMPLINGMATRIX, &smat[0][0], rstride,
229  cstride);
230  setnurbsproperty(GL_MAP2_VERTEX_3, N_SAMPLINGMATRIX, &smat[0][0], rstride,
231  cstride);
232  setnurbsproperty(GL_MAP2_VERTEX_4, N_SAMPLINGMATRIX, &smat[0][0], rstride,
233  cstride);
234 }
#define GL_MAP1_VERTEX_4
Definition: gl.h:559
#define N_SAMPLINGMATRIX
Definition: nurbsconsts.h:106
void setnurbsproperty(long, INREAL)
#define GL_MAP2_VERTEX_4
Definition: gl.h:568
#define INREAL
Definition: types.h:40
#define GL_MAP2_VERTEX_3
Definition: gl.h:567
#define GL_MAP1_VERTEX_3
Definition: gl.h:558
float REAL
Definition: types.h:41

Referenced by loadGLMatrices(), and useGLMatrices().

◆ LOD_eval_list()

void GLUnurbs::LOD_eval_list ( int  level)
inline

Definition at line 112 of file glrenderer.h.

113  {
115  }
GLint level
Definition: gl.h:1546
void LOD_eval_list(int level)
Definition: glsurfeval.cc:84
OpenGLSurfaceEvaluator surfaceEvaluator
Definition: glrenderer.h:131

Referenced by glu_LOD_eval_list().

◆ multmatrix4d()

void GLUnurbs::multmatrix4d ( GLfloat  n[4][4],
const GLfloat  left[4][4],
const GLfloat  right[4][4] 
)
staticprivate

Definition at line 294 of file glrenderer.cc.

296 {
297  transform4d ((GLfloat *) n[0],(GLfloat *) left[0],(GLfloat (*)[4]) right);
298  transform4d ((GLfloat *) n[1],(GLfloat *) left[1],(GLfloat (*)[4]) right);
299  transform4d ((GLfloat *) n[2],(GLfloat *) left[2],(GLfloat (*)[4]) right);
300  transform4d ((GLfloat *) n[3],(GLfloat *) left[3],(GLfloat (*)[4]) right);
301 }
GLdouble n
Definition: glext.h:7729
static void transform4d(GLfloat A[4], GLfloat B[4], GLfloat mat[4][4])
Definition: glrenderer.cc:280
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
float GLfloat
Definition: gl.h:161

Referenced by grabGLMatrix(), and useGLMatrices().

◆ postError()

void GLUnurbs::postError ( int  which)
inline

Definition at line 72 of file glrenderer.h.

73  { if (errorCallback) (errorCallback)( (GLenum)which ); }
static GLenum which
Definition: wgl_font.c:159
errorCallbackType errorCallback
Definition: glrenderer.h:71
unsigned int GLenum
Definition: gl.h:150

Referenced by errorHandler().

◆ put_callback_auto_normal()

void GLUnurbs::put_callback_auto_normal ( int  flag)
inline

Definition at line 99 of file glrenderer.h.

100  {
102  }
void put_callback_auto_normal(int flag)
Definition: glsurfeval.h:158
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
OpenGLSurfaceEvaluator surfaceEvaluator
Definition: glrenderer.h:131

◆ put_callbackFlag()

void GLUnurbs::put_callbackFlag ( int  flag)
inline

Definition at line 122 of file glrenderer.h.

123  {
124  callbackFlag = flag;
127  }
void put_vertices_call_back(int flag)
Definition: glcurveval.h:87
void put_vertices_call_back(int flag)
Definition: glsurfeval.h:153
int callbackFlag
Definition: glrenderer.h:143
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
OpenGLCurveEvaluator curveEvaluator
Definition: glrenderer.h:132
OpenGLSurfaceEvaluator surfaceEvaluator
Definition: glrenderer.h:131

◆ put_vertices_call_back()

void GLUnurbs::put_vertices_call_back ( int  flag)
inline

Definition at line 89 of file glrenderer.h.

90  {
92  }
void put_vertices_call_back(int flag)
Definition: glsurfeval.h:153
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
OpenGLSurfaceEvaluator surfaceEvaluator
Definition: glrenderer.h:131

◆ putSurfCallBack()

void GLUnurbs::putSurfCallBack ( GLenum  which,
_GLUfuncptr  fn 
)
inline

Definition at line 77 of file glrenderer.h.

79  {
82  }
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159
static GLenum which
Definition: wgl_font.c:159
void putCallBack(GLenum which, _GLUfuncptr fn)
Definition: glcurveval.cc:305
void putCallBack(GLenum which, _GLUfuncptr fn)
Definition: glsurfeval.cc:1190
OpenGLCurveEvaluator curveEvaluator
Definition: glrenderer.h:132
OpenGLSurfaceEvaluator surfaceEvaluator
Definition: glrenderer.h:131

◆ setautoloadmode()

void GLUnurbs::setautoloadmode ( INREAL  value)
inline

Definition at line 62 of file glrenderer.h.

63  {
64 
65  if (value) autoloadmode = GL_TRUE;
66  else autoloadmode = GL_FALSE;
67 
68  }
#define GL_FALSE
Definition: gl.h:173
#define GL_TRUE
Definition: gl.h:174
GLboolean autoloadmode
Definition: glrenderer.h:130

◆ setNurbsCallbackData()

void GLUnurbs::setNurbsCallbackData ( void userData)
inline

Definition at line 104 of file glrenderer.h.

105  {
108  }
OpenGLCurveEvaluator curveEvaluator
Definition: glrenderer.h:132
void set_callback_userData(void *data)
Definition: glcurveval.h:96
void set_callback_userData(void *data)
Definition: glsurfeval.h:168
OpenGLSurfaceEvaluator surfaceEvaluator
Definition: glrenderer.h:131

◆ setSamplingMatrixIdentity()

void GLUnurbs::setSamplingMatrixIdentity ( void  )

Definition at line 171 of file glrenderer.cc.

172 {
173  INREAL smat[4][4] = {
174  {1,0,0,0},
175  {0,1,0,0},
176  {0,0,1,0},
177  {0,0,0,1}
178  };
179  const long rstride = sizeof(smat[0]) / sizeof(smat[0][0]);
180  const long cstride = 1;
181 
182  setnurbsproperty(GL_MAP1_VERTEX_3, N_SAMPLINGMATRIX, &smat[0][0], rstride,
183  cstride);
184  setnurbsproperty(GL_MAP1_VERTEX_4, N_SAMPLINGMATRIX, &smat[0][0], rstride,
185  cstride);
186  setnurbsproperty(GL_MAP2_VERTEX_3, N_SAMPLINGMATRIX, &smat[0][0], rstride,
187  cstride);
188  setnurbsproperty(GL_MAP2_VERTEX_4, N_SAMPLINGMATRIX, &smat[0][0], rstride,
189  cstride);
190 }
#define GL_MAP1_VERTEX_4
Definition: gl.h:559
#define N_SAMPLINGMATRIX
Definition: nurbsconsts.h:106
void setnurbsproperty(long, INREAL)
#define GL_MAP2_VERTEX_4
Definition: gl.h:568
#define INREAL
Definition: types.h:40
#define GL_MAP2_VERTEX_3
Definition: gl.h:567
#define GL_MAP1_VERTEX_3
Definition: gl.h:558

◆ transform4d()

void GLUnurbs::transform4d ( GLfloat  A[4],
GLfloat  B[4],
GLfloat  mat[4][4] 
)
staticprivate

Definition at line 280 of file glrenderer.cc.

281 {
282 
283  A[0] = B[0]*mat[0][0] + B[1]*mat[1][0] + B[2]*mat[2][0] + B[3]*mat[3][0];
284  A[1] = B[0]*mat[0][1] + B[1]*mat[1][1] + B[2]*mat[2][1] + B[3]*mat[3][1];
285  A[2] = B[0]*mat[0][2] + B[1]*mat[1][2] + B[2]*mat[2][2] + B[3]*mat[3][2];
286  A[3] = B[0]*mat[0][3] + B[1]*mat[1][3] + B[2]*mat[2][3] + B[3]*mat[3][3];
287 }
static const MAT2 mat
Definition: font.c:66
Definition: ttei1.cpp:12
#define B(row, col)

Referenced by multmatrix4d().

◆ useGLMatrices()

void GLUnurbs::useGLMatrices ( const GLfloat  modelMatrix[16],
const GLfloat  projMatrix[16],
const GLint  viewport[4] 
)

Definition at line 141 of file glrenderer.cc.

144 {
145  GLfloat vmat[4][4];
146 
147  multmatrix4d(vmat, (const GLfloat (*)[4]) modelMatrix,
148  (const GLfloat (*)[4]) projMatrix);
149  loadCullingMatrix((GLfloat (*)[4]) vmat);
150  loadSamplingMatrix((const GLfloat (*)[4]) vmat, (const GLint *) viewport);
151 }
void loadSamplingMatrix(const GLfloat vmat[4][4], const GLint viewport[4])
Definition: glrenderer.cc:194
static void multmatrix4d(GLfloat n[4][4], const GLfloat left[4][4], const GLfloat right[4][4])
Definition: glrenderer.cc:294
void loadCullingMatrix(GLfloat vmat[4][4])
Definition: glrenderer.cc:237
float GLfloat
Definition: gl.h:161
int GLint
Definition: gl.h:156

Member Data Documentation

◆ autoloadmode

GLboolean GLUnurbs::autoloadmode
private

Definition at line 130 of file glrenderer.h.

Referenced by bgnrender(), getautoloadmode(), GLUnurbs(), and setautoloadmode().

◆ callbackFlag

int GLUnurbs::callbackFlag
private

Definition at line 143 of file glrenderer.h.

Referenced by GLUnurbs(), is_callback(), and put_callbackFlag().

◆ curveEvaluator

OpenGLCurveEvaluator GLUnurbs::curveEvaluator
private

Definition at line 132 of file glrenderer.h.

Referenced by put_callbackFlag(), putSurfCallBack(), and setNurbsCallbackData().

◆ errorCallback

errorCallbackType GLUnurbs::errorCallback

Definition at line 71 of file glrenderer.h.

Referenced by GLUnurbs(), and postError().

◆ surfaceEvaluator


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