ReactOS  0.4.14-dev-317-g96040ec
OpenGLSurfaceEvaluator Class Reference

#include <glsurfeval.h>

Inheritance diagram for OpenGLSurfaceEvaluator:
Collaboration diagram for OpenGLSurfaceEvaluator:

Public Member Functions

 OpenGLSurfaceEvaluator ()
 
virtual ~OpenGLSurfaceEvaluator (void)
 
void polymode (long style)
 
void range2f (long, REAL *, REAL *)
 
void domain2f (REAL, REAL, REAL, REAL)
 
void addMap (SurfaceMap *)
 
void enable (long)
 
void disable (long)
 
void bgnmap2f (long)
 
void map2f (long, REAL, REAL, long, long, REAL, REAL, long, long, REAL *)
 
void mapgrid2f (long, REAL, REAL, long, REAL, REAL)
 
void mapmesh2f (long, long, long, long, long)
 
void evalcoord2f (long, REAL, REAL)
 
void evalpoint2i (long, long)
 
void endmap2f (void)
 
void bgnline (void)
 
void endline (void)
 
void bgnclosedline (void)
 
void endclosedline (void)
 
void bgntmesh (void)
 
void swaptmesh (void)
 
void endtmesh (void)
 
void bgnqstrip (void)
 
void endqstrip (void)
 
void bgntfan (void)
 
void endtfan (void)
 
void evalUStrip (int n_upper, REAL v_upper, REAL *upper_val, int n_lower, REAL v_lower, REAL *lower_val)
 
void evalVStrip (int n_left, REAL u_left, REAL *left_val, int n_right, REAL u_right, REAL *right_val)
 
void coord2f (REAL, REAL)
 
void point2i (long, long)
 
void newtmeshvert (REAL, REAL)
 
void newtmeshvert (long, long)
 
void putCallBack (GLenum which, _GLUfuncptr fn)
 
int get_vertices_call_back ()
 
void put_vertices_call_back (int flag)
 
void put_callback_auto_normal (int flag)
 
int get_callback_auto_normal ()
 
void set_callback_userData (void *data)
 
void LOD_eval_list (int level)
 
- Public Member Functions inherited from BasicSurfaceEvaluator
virtual ~BasicSurfaceEvaluator ()
 
- 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)
 

Private Member Functions

 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)
 
void LOD_triangle (REAL A[2], REAL B[2], REAL C[2], int level)
 
void LOD_eval (int num_vert, REAL *verts, int type, int level)
 
void inDoDomain2WithDerivs (int k, REAL u, REAL v, REAL u1, REAL u2, int uorder, REAL v1, REAL v2, int vorder, REAL *baseData, REAL *retPoint, REAL *retdu, REAL *retdv)
 
void inPreEvaluate (int order, REAL vprime, REAL *coeff)
 
void inPreEvaluateWithDeriv (int order, REAL vprime, REAL *coeff, REAL *coeffDeriv)
 
void inComputeFirstPartials (REAL *p, REAL *pu, REAL *pv)
 
void inComputeNormal2 (REAL *pu, REAL *pv, REAL *n)
 
void inDoEvalCoord2 (REAL u, REAL v, REAL *retPoint, REAL *retNormal)
 
void inDoEvalCoord2NOGE (REAL u, REAL v, REAL *retPoint, REAL *retNormal)
 
void inMap2f (int k, REAL ulower, REAL uupper, int ustride, int uorder, REAL vlower, REAL vupper, int vstride, int vorder, REAL *ctlPoints)
 
void inMapGrid2f (int nu, REAL u0, REAL u1, int nv, REAL v0, REAL v1)
 
void inEvalMesh2 (int lowU, int lowV, int highU, int highV)
 
void inEvalPoint2 (int i, int j)
 
void inEvalCoord2f (REAL u, REAL v)
 
void inEvalULine (int n_points, REAL v, REAL *u_vals, int stride, REAL ret_points[][3], REAL ret_normals[][3])
 
void inEvalVLine (int n_points, REAL u, REAL *v_vals, int stride, REAL ret_points[][3], REAL ret_normals[][3])
 
void inEvalUStrip (int n_upper, REAL v_upper, REAL *upper_val, int n_lower, REAL v_lower, REAL *lower_val)
 
void inEvalVStrip (int n_left, REAL u_left, REAL *left_val, int n_right, REAL u_right, REAL *right_val)
 
void inPreEvaluateBV (int k, int uorder, int vorder, REAL vprime, REAL *baseData)
 
void inPreEvaluateBU (int k, int uorder, int vorder, REAL uprime, REAL *baseData)
 
void inPreEvaluateBV_intfac (REAL v)
 
void inPreEvaluateBU_intfac (REAL u)
 
void inDoDomain2WithDerivsBV (int k, REAL u, REAL v, REAL u1, REAL u2, int uorder, REAL v1, REAL v2, int vorder, REAL *baseData, REAL *retPoint, REAL *retdu, REAL *retdv)
 
void inDoDomain2WithDerivsBU (int k, REAL u, REAL v, REAL u1, REAL u2, int uorder, REAL v1, REAL v2, int vorder, REAL *baseData, REAL *retPoint, REAL *retdu, REAL *retdv)
 
void inDoEvalCoord2NOGE_BV (REAL u, REAL v, REAL *retPoint, REAL *retNormal)
 
void inDoEvalCoord2NOGE_BU (REAL u, REAL v, REAL *retPoint, REAL *retNormal)
 
void inBPMEval (bezierPatchMesh *bpm)
 
void inBPMListEval (bezierPatchMesh *list)
 
void inMap2fEM (int which, int dimension, REAL ulower, REAL uupper, int ustride, int uorder, REAL vlower, REAL vupper, int vstride, int vorder, REAL *ctlPoints)
 
void inDoDomain2WithDerivsEM (surfEvalMachine *em, REAL u, REAL v, REAL *retPoint, REAL *retdu, REAL *retdv)
 
void inDoDomain2EM (surfEvalMachine *em, REAL u, REAL v, REAL *retPoint)
 
void inDoEvalCoord2EM (REAL u, REAL v)
 
void inBPMEvalEM (bezierPatchMesh *bpm)
 
void inBPMListEvalEM (bezierPatchMesh *list)
 

Private Attributes

StoredVertexvertexCache [VERTEX_CACHE_SIZE]
 
int tmeshing
 
int which
 
int vcount
 
GLint gl_polygon_mode [2]
 
bezierPatchMeshglobal_bpm
 
int output_triangles
 
voiddata
 
voiduserData
 
int LOD_eval_level
 
int global_uorder
 
int global_vorder
 
REAL global_uprime
 
REAL global_vprime
 
REAL global_vprime_BV
 
REAL global_uprime_BU
 
int global_uorder_BV
 
int global_vorder_BV
 
int global_uorder_BU
 
int global_vorder_BU
 
REAL global_ucoeff [IN_MAX_BEZIER_ORDER]
 
REAL global_vcoeff [IN_MAX_BEZIER_ORDER]
 
REAL global_ucoeffDeriv [IN_MAX_BEZIER_ORDER]
 
REAL global_vcoeffDeriv [IN_MAX_BEZIER_ORDER]
 
REAL global_BV [IN_MAX_BEZIER_ORDER][IN_MAX_DIMENSION]
 
REAL global_PBV [IN_MAX_BEZIER_ORDER][IN_MAX_DIMENSION]
 
REAL global_BU [IN_MAX_BEZIER_ORDER][IN_MAX_DIMENSION]
 
REAL global_PBU [IN_MAX_BEZIER_ORDER][IN_MAX_DIMENSION]
 
REALglobal_baseData
 
int global_ev_k
 
REAL global_ev_u1
 
REAL global_ev_u2
 
int global_ev_ustride
 
int global_ev_uorder
 
REAL global_ev_v1
 
REAL global_ev_v2
 
int global_ev_vstride
 
int global_ev_vorder
 
REAL global_ev_ctlPoints [IN_MAX_BEZIER_ORDER *IN_MAX_BEZIER_ORDER *IN_MAX_DIMENSION]
 
REAL global_grid_u0
 
REAL global_grid_u1
 
int global_grid_nu
 
REAL global_grid_v0
 
REAL global_grid_v1
 
int global_grid_nv
 
surfEvalMachine em_vertex
 
surfEvalMachine em_normal
 
surfEvalMachine em_color
 
surfEvalMachine em_texcoord
 
int auto_normal_flag
 
int callback_auto_normal
 
int vertex_flag
 
int normal_flag
 
int color_flag
 
int texcoord_flag
 

Additional Inherited Members

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

Detailed Description

Definition at line 100 of file glsurfeval.h.

Constructor & Destructor Documentation

◆ OpenGLSurfaceEvaluator()

OpenGLSurfaceEvaluator::OpenGLSurfaceEvaluator ( )

Definition at line 99 of file glsurfeval.cc.

100 {
101  int i;
102 
103  for (i=0; i<VERTEX_CACHE_SIZE; i++) {
104  vertexCache[i] = new StoredVertex;
105  }
106  tmeshing = 0;
107  which = 0;
108  vcount = 0;
109 
110  global_uorder = 0;
111  global_vorder = 0;
112  global_uprime = -1.0;
113  global_vprime = -1.0;
114  global_vprime_BV = -1.0;
115  global_uprime_BU = -1.0;
116  global_uorder_BU = 0;
117  global_vorder_BU = 0;
118  global_uorder_BV = 0;
119  global_vorder_BV = 0;
121 
122  global_bpm = NULL;
123  output_triangles = 0; //don't output triangles by default
124 
125  //no default callback functions
126  beginCallBackN = NULL;
127  endCallBackN = NULL;
128  vertexCallBackN = NULL;
129  normalCallBackN = NULL;
130  colorCallBackN = NULL;
131  texcoordCallBackN = NULL;
132  beginCallBackData = NULL;
133  endCallBackData = NULL;
134  vertexCallBackData = NULL;
135  normalCallBackData = NULL;
136  colorCallBackData = NULL;
137  texcoordCallBackData = NULL;
138 
139  userData = NULL;
140 
141  auto_normal_flag = 0;
142  callback_auto_normal = 0; //default of GLU_CALLBACK_AUTO_NORMAL is 0
143  vertex_flag = 0;
144  normal_flag = 0;
145  color_flag = 0;
146  texcoord_flag = 0;
147 
148  em_vertex.uprime = -1.0;
149  em_vertex.vprime = -1.0;
150  em_normal.uprime = -1.0;
151  em_normal.vprime = -1.0;
152  em_color.uprime = -1.0;
153  em_color.vprime = -1.0;
154  em_texcoord.uprime = -1.0;
155  em_texcoord.vprime = -1.0;
156 
157 #ifdef USE_LOD
158  LOD_eval_level = 1;
159 #endif
160 }
surfEvalMachine em_vertex
Definition: glsurfeval.h:349
#define VERTEX_CACHE_SIZE
Definition: glsurfeval.h:52
surfEvalMachine em_color
Definition: glsurfeval.h:351
bezierPatchMesh * global_bpm
Definition: glsurfeval.h:188
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
smooth NULL
Definition: ftsmooth.c:416
StoredVertex * vertexCache[VERTEX_CACHE_SIZE]
Definition: glsurfeval.h:180
surfEvalMachine em_texcoord
Definition: glsurfeval.h:352
surfEvalMachine em_normal
Definition: glsurfeval.h:350

◆ ~OpenGLSurfaceEvaluator()

OpenGLSurfaceEvaluator::~OpenGLSurfaceEvaluator ( void  )
virtual

Definition at line 162 of file glsurfeval.cc.

163 {
164  for (int ii= 0; ii< VERTEX_CACHE_SIZE; ii++) {
165  delete vertexCache[ii];
166  vertexCache[ii]= 0;
167  }
168 }
#define VERTEX_CACHE_SIZE
Definition: glsurfeval.h:52
StoredVertex * vertexCache[VERTEX_CACHE_SIZE]
Definition: glsurfeval.h:180

Member Function Documentation

◆ addMap()

void OpenGLSurfaceEvaluator::addMap ( SurfaceMap *  )
inline

Definition at line 107 of file glsurfeval.h.

107 { }

◆ beginCallBack()

void OpenGLSurfaceEvaluator::beginCallBack ( GLenum  type,
void data 
)
private

Definition at line 1237 of file glsurfeval.cc.

1238 {
1239  if(beginCallBackData)
1240  beginCallBackData(which, data);
1241  else if(beginCallBackN)
1242  beginCallBackN(which);
1243 }
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950

Referenced by inBPMEval(), and inBPMEvalEM().

◆ bgnclosedline()

void OpenGLSurfaceEvaluator::bgnclosedline ( void  )
virtual

Reimplemented from BasicSurfaceEvaluator.

Definition at line 268 of file glsurfeval.cc.

269 {
270  if(output_triangles)
272  else
274 }
bezierPatchMesh * global_bpm
Definition: glsurfeval.h:188
#define GL_LINE_LOOP
Definition: gl.h:192
GLAPI void GLAPIENTRY glBegin(GLenum mode)
unsigned int GLenum
Definition: gl.h:150
void bezierPatchMeshBeginStrip(bezierPatchMesh *bpm, GLenum type)

◆ bgnline()

void OpenGLSurfaceEvaluator::bgnline ( void  )
virtual

Reimplemented from BasicSurfaceEvaluator.

Definition at line 240 of file glsurfeval.cc.

241 {
242  if(output_triangles)
244  else
246 }
bezierPatchMesh * global_bpm
Definition: glsurfeval.h:188
#define GL_LINE_STRIP
Definition: gl.h:193
GLAPI void GLAPIENTRY glBegin(GLenum mode)
unsigned int GLenum
Definition: gl.h:150
void bezierPatchMeshBeginStrip(bezierPatchMesh *bpm, GLenum type)

◆ bgnmap2f()

void OpenGLSurfaceEvaluator::bgnmap2f ( long  )
virtual

Reimplemented from BasicSurfaceEvaluator.

Definition at line 739 of file glsurfeval.cc.

740 {
741  if(output_triangles)
742  {
743  /*deallocate the space which may has been
744  *allocated by global_bpm previously
745  */
746  if(global_bpm != NULL) {
748  global_bpm = NULL;
749  }
750 
751 
752  /*
753  auto_normal_flag = 1; //always output normal in callback mode.
754  //we could have used the following code,
755  //but Inspector doesn't have gl context
756  //before it calls tessellator.
757  //this way is temporary.
758  */
759  //NEWCALLBACK
760  //if one of the two normal callback functions are set,
761  //then set
762  if(normalCallBackN != NULL ||
763  normalCallBackData != NULL)
764  auto_normal_flag = 1;
765  else
766  auto_normal_flag = 0;
767 
768  //initialize so that no maps initially
769  vertex_flag = 0;
770  normal_flag = 0;
771  color_flag = 0;
772  texcoord_flag = 0;
773 
774  /*
775  if(glIsEnabled(GL_AUTO_NORMAL) == GL_TRUE)
776  auto_normal_flag = 1;
777  else if (callback_auto_normal == 1)
778  auto_normal_flag = 1;
779  else
780  auto_normal_flag = 0;
781  */
783 
784  }
785  else
786  {
788 
789  /*to avoid side effect, we restor the opengl state for GL_POLYGON_MODE
790  */
792  }
793 
794 }
void bezierPatchMeshListDelete(bezierPatchMesh *list)
bezierPatchMesh * global_bpm
Definition: glsurfeval.h:188
#define GL_EVAL_BIT
Definition: gl.h:718
GLAPI void GLAPIENTRY glPushAttrib(GLbitfield mask)
smooth NULL
Definition: ftsmooth.c:416
#define GL_POLYGON_MODE
Definition: gl.h:272
GLAPI void GLAPIENTRY glGetIntegerv(GLenum pname, GLint *params)
unsigned int GLbitfield
Definition: gl.h:152

◆ bgnqstrip()

void OpenGLSurfaceEvaluator::bgnqstrip ( void  )
virtual

Reimplemented from BasicSurfaceEvaluator.

Definition at line 712 of file glsurfeval.cc.

713 {
714  if(output_triangles)
716  else
718 
719 #ifdef STATISTICS
720  STAT_num_of_quad_strips++;
721 #endif
722 }
bezierPatchMesh * global_bpm
Definition: glsurfeval.h:188
GLAPI void GLAPIENTRY glBegin(GLenum mode)
unsigned int GLenum
Definition: gl.h:150
#define GL_QUAD_STRIP
Definition: gl.h:198
void bezierPatchMeshBeginStrip(bezierPatchMesh *bpm, GLenum type)

Referenced by inEvalMesh2(), and mapmesh2f().

◆ bgntfan()

void OpenGLSurfaceEvaluator::bgntfan ( void  )
virtual

Reimplemented from BasicSurfaceEvaluator.

Definition at line 324 of file glsurfeval.cc.

325 {
326 
327  if(output_triangles)
329  else
331 
332 }
bezierPatchMesh * global_bpm
Definition: glsurfeval.h:188
#define GL_TRIANGLE_FAN
Definition: gl.h:196
GLAPI void GLAPIENTRY glBegin(GLenum mode)
unsigned int GLenum
Definition: gl.h:150
void bezierPatchMeshBeginStrip(bezierPatchMesh *bpm, GLenum type)

Referenced by evalUStrip(), evalVStrip(), inEvalUStrip(), and inEvalVStrip().

◆ bgntmesh()

void OpenGLSurfaceEvaluator::bgntmesh ( void  )
virtual

Reimplemented from BasicSurfaceEvaluator.

Definition at line 290 of file glsurfeval.cc.

291 {
292 
293  tmeshing = 1;
294  which = 0;
295  vcount = 0;
296 
297  if(output_triangles)
299  else
301 
302 }
#define GL_TRIANGLES
Definition: gl.h:194
bezierPatchMesh * global_bpm
Definition: glsurfeval.h:188
GLAPI void GLAPIENTRY glBegin(GLenum mode)
unsigned int GLenum
Definition: gl.h:150
void bezierPatchMeshBeginStrip(bezierPatchMesh *bpm, GLenum type)

◆ colorCallBack()

void OpenGLSurfaceEvaluator::colorCallBack ( const GLfloat color,
void data 
)
private

Definition at line 1274 of file glsurfeval.cc.

1275 {
1276  if(colorCallBackData)
1277  colorCallBackData(color, data);
1278  else if(colorCallBackN)
1279  colorCallBackN(color);
1280 }
GLuint color
Definition: glext.h:6243
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950

Referenced by inDoEvalCoord2EM().

◆ coord2f()

void OpenGLSurfaceEvaluator::coord2f ( REAL  u,
REAL  v 
)

Definition at line 1106 of file glsurfeval.cc.

1107 {
1108 #ifdef NO_EVALUATION
1109 return;
1110 #else
1111 
1112 #ifdef USE_INTERNAL_EVAL
1113  inEvalCoord2f( u, v);
1114 #else
1115 
1116 
1117 if(output_triangles)
1119 else
1121 
1122 
1123 #endif
1124 
1125 
1126 #ifdef STATISTICS
1127  STAT_num_of_eval_vertices++;
1128 #endif
1129 
1130 #endif
1131 }
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
void inEvalCoord2f(REAL u, REAL v)
Definition: insurfeval.cc:375
bezierPatchMesh * global_bpm
Definition: glsurfeval.h:188
void bezierPatchMeshInsertUV(bezierPatchMesh *bpm, float u, float v)
const GLdouble * v
Definition: gl.h:2040
float GLfloat
Definition: gl.h:161
GLAPI void GLAPIENTRY glEvalCoord2f(GLfloat u, GLfloat v)

Referenced by evalUStrip(), evalVStrip(), StoredVertex::invoke(), mapmesh2f(), newtmeshvert(), and point2i().

◆ disable()

void OpenGLSurfaceEvaluator::disable ( long  type)
virtual

Reimplemented from BasicSurfaceEvaluator.

Definition at line 175 of file glsurfeval.cc.

176 {
177  glDisable((GLenum) type);
178 }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLAPI void GLAPIENTRY glDisable(GLenum cap)
unsigned int GLenum
Definition: gl.h:150

◆ domain2f()

void OpenGLSurfaceEvaluator::domain2f ( REAL  ulo,
REAL  uhi,
REAL  vlo,
REAL  vhi 
)
virtual

Reimplemented from BasicSurfaceEvaluator.

Definition at line 263 of file glsurfeval.cc.

264 {
265 }

◆ enable()

void OpenGLSurfaceEvaluator::enable ( long  type)
virtual

Reimplemented from BasicSurfaceEvaluator.

Definition at line 185 of file glsurfeval.cc.

186 {
187  glEnable((GLenum) type);
188 }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLAPI void GLAPIENTRY glEnable(GLenum cap)
unsigned int GLenum
Definition: gl.h:150

◆ endCallBack()

void OpenGLSurfaceEvaluator::endCallBack ( void data)
private

Definition at line 1246 of file glsurfeval.cc.

1247 {
1248  if(endCallBackData)
1249  endCallBackData(data);
1250  else if(endCallBackN)
1251  endCallBackN();
1252 }
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950

Referenced by inBPMEval(), and inBPMEvalEM().

◆ endclosedline()

void OpenGLSurfaceEvaluator::endclosedline ( void  )
virtual

Reimplemented from BasicSurfaceEvaluator.

Definition at line 277 of file glsurfeval.cc.

278 {
279  if(output_triangles)
281  else
282  glEnd();
283 }
bezierPatchMesh * global_bpm
Definition: glsurfeval.h:188
void bezierPatchMeshEndStrip(bezierPatchMesh *bpm)
GLAPI void GLAPIENTRY glEnd(void)

◆ endline()

void OpenGLSurfaceEvaluator::endline ( void  )
virtual

Reimplemented from BasicSurfaceEvaluator.

Definition at line 249 of file glsurfeval.cc.

250 {
251  if(output_triangles)
253  else
254  glEnd();
255 }
bezierPatchMesh * global_bpm
Definition: glsurfeval.h:188
void bezierPatchMeshEndStrip(bezierPatchMesh *bpm)
GLAPI void GLAPIENTRY glEnd(void)

◆ endmap2f()

void OpenGLSurfaceEvaluator::endmap2f ( void  )
virtual

Reimplemented from BasicSurfaceEvaluator.

Definition at line 801 of file glsurfeval.cc.

802 {
803 
804  if(output_triangles)
805  {
806  //bezierPatchMeshListDelDeg(global_bpm);
807 
808  // bezierPatchMeshListEval(global_bpm);
809 
810  //surfcount++;
811  //printf("surfcount=%i\n", surfcount);
812  //if(surfcount == 8) exit(0);
813 
815 
816 
817 
818 /*
819  global_bpm = bezierPatchMeshListReverse(global_bpm);
820  {
821  float *vertex_array;
822  float *normal_array;
823  int *length_array;
824  int *type_array;
825  int num_strips;
826  bezierPatchMeshListCollect(global_bpm, &vertex_array, &normal_array, &length_array, &type_array, &num_strips);
827  drawStrips(vertex_array, normal_array, length_array, type_array, num_strips);
828  free(vertex_array);
829  free(normal_array);
830  free(length_array);
831  free(type_array);
832  }
833 */
834 
835  //bezierPatchMeshListPrint(global_bpm);
836  //bezierPatchMeshListDraw(global_bpm);
837 
838 // printf("num triangles=%i\n", bezierPatchMeshListNumTriangles(global_bpm));
839 
840 #ifdef USE_LOD
841 #else
843  global_bpm = NULL;
844 #endif
845  glPopAttrib();
846  }
847 else
848  {
849 #ifndef USE_LOD
850  glPopAttrib();
851 #endif
852 
853 #ifdef STATISTICS
854  fprintf(stderr, "num_vertices=%i,num_triangles=%i,num_quads_strips=%i\n", STAT_num_of_eval_vertices,STAT_num_of_triangles,STAT_num_of_quad_strips);
855 #endif
856 
857  /*to restore the gl_polygon_mode
858  */
859 #ifndef USE_LOD
862 #endif
863 }
864 
865 }
#define GL_BACK
Definition: gl.h:271
void bezierPatchMeshListDelete(bezierPatchMesh *list)
GLAPI void GLAPIENTRY glPolygonMode(GLenum face, GLenum mode)
bezierPatchMesh * global_bpm
Definition: glsurfeval.h:188
void inBPMListEvalEM(bezierPatchMesh *list)
Definition: insurfeval.cc:2056
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
#define GL_FRONT
Definition: gl.h:270
smooth NULL
Definition: ftsmooth.c:416
unsigned int GLenum
Definition: gl.h:150
FILE * stderr
GLAPI void GLAPIENTRY glPopAttrib(void)

◆ endqstrip()

void OpenGLSurfaceEvaluator::endqstrip ( void  )
virtual

Reimplemented from BasicSurfaceEvaluator.

Definition at line 725 of file glsurfeval.cc.

726 {
727  if(output_triangles)
729  else
730  glEnd();
731 
732 }
bezierPatchMesh * global_bpm
Definition: glsurfeval.h:188
void bezierPatchMeshEndStrip(bezierPatchMesh *bpm)
GLAPI void GLAPIENTRY glEnd(void)

Referenced by inEvalMesh2(), and mapmesh2f().

◆ endtfan()

void OpenGLSurfaceEvaluator::endtfan ( void  )
virtual

Reimplemented from BasicSurfaceEvaluator.

Definition at line 334 of file glsurfeval.cc.

335 {
336  if(output_triangles)
338  else
339  glEnd();
340 }
bezierPatchMesh * global_bpm
Definition: glsurfeval.h:188
void bezierPatchMeshEndStrip(bezierPatchMesh *bpm)
GLAPI void GLAPIENTRY glEnd(void)

Referenced by evalUStrip(), evalVStrip(), inEvalUStrip(), and inEvalVStrip().

◆ endtmesh()

void OpenGLSurfaceEvaluator::endtmesh ( void  )
virtual

Reimplemented from BasicSurfaceEvaluator.

Definition at line 312 of file glsurfeval.cc.

313 {
314  tmeshing = 0;
315 
316 
317  if(output_triangles)
319  else
320  glEnd();
321 }
bezierPatchMesh * global_bpm
Definition: glsurfeval.h:188
void bezierPatchMeshEndStrip(bezierPatchMesh *bpm)
GLAPI void GLAPIENTRY glEnd(void)

◆ evalcoord2f()

void OpenGLSurfaceEvaluator::evalcoord2f ( long  ,
REAL  u,
REAL  v 
)
virtual

Reimplemented from BasicSurfaceEvaluator.

Definition at line 1042 of file glsurfeval.cc.

1043 {
1044 
1045 
1046 #ifdef NO_EVALUATION
1047 return;
1048 #endif
1049 
1050 
1051  newtmeshvert(u, v);
1052 }
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
void newtmeshvert(REAL, REAL)
Definition: glsurfeval.cc:1160
const GLdouble * v
Definition: gl.h:2040

◆ evalpoint2i()

void OpenGLSurfaceEvaluator::evalpoint2i ( long  u,
long  v 
)
virtual

Reimplemented from BasicSurfaceEvaluator.

Definition at line 1059 of file glsurfeval.cc.

1060 {
1061 #ifdef NO_EVALUATION
1062 return;
1063 #endif
1064 
1065  newtmeshvert(u, v);
1066 }
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
void newtmeshvert(REAL, REAL)
Definition: glsurfeval.cc:1160
const GLdouble * v
Definition: gl.h:2040

◆ evalUStrip()

void OpenGLSurfaceEvaluator::evalUStrip ( int  n_upper,
REAL  v_upper,
REAL upper_val,
int  n_lower,
REAL  v_lower,
REAL lower_val 
)
virtual

Implements BasicSurfaceEvaluator.

Definition at line 343 of file glsurfeval.cc.

344 {
345 #ifdef USE_INTERNAL_EVAL
346  inEvalUStrip(n_upper, v_upper, upper_val,
347  n_lower, v_lower, lower_val);
348 #else
349 
350 #ifdef FOR_CHRIS
351  evalUStripExt(n_upper, v_upper, upper_val,
352  n_lower, v_lower, lower_val);
353  return;
354 
355 #endif
356  int i,j,k,l;
357  REAL leftMostV[2];
358 
359  /*
360  *the algorithm works by scanning from left to right.
361  *leftMostV: the left most of the remaining verteces (on both upper and lower).
362  * it could an element of upperVerts or lowerVerts.
363  *i: upperVerts[i] is the first vertex to the right of leftMostV on upper line
364  *j: lowerVerts[j] is the first vertex to the right of leftMostV on lower line
365  */
366 
367  /*initialize i,j,and leftMostV
368  */
369  if(upper_val[0] <= lower_val[0])
370  {
371  i=1;
372  j=0;
373 
374  leftMostV[0] = upper_val[0];
375  leftMostV[1] = v_upper;
376  }
377  else
378  {
379  i=0;
380  j=1;
381 
382  leftMostV[0] = lower_val[0];
383  leftMostV[1] = v_lower;
384 
385  }
386 
387  /*the main loop.
388  *the invariance is that:
389  *at the beginning of each loop, the meaning of i,j,and leftMostV are
390  *maintained
391  */
392  while(1)
393  {
394  if(i >= n_upper) /*case1: no more in upper*/
395  {
396  if(j<n_lower-1) /*at least two vertices in lower*/
397  {
398  bgntfan();
399  coord2f(leftMostV[0], leftMostV[1]);
400 // glNormal3fv(leftMostNormal);
401 // glVertex3fv(leftMostXYZ);
402 
403  while(j<n_lower){
404  coord2f(lower_val[j], v_lower);
405 // glNormal3fv(lowerNormal[j]);
406 // glVertex3fv(lowerXYZ[j]);
407  j++;
408 
409  }
410  endtfan();
411  }
412  break; /*exit the main loop*/
413  }
414  else if(j>= n_lower) /*case2: no more in lower*/
415  {
416  if(i<n_upper-1) /*at least two vertices in upper*/
417  {
418  bgntfan();
419  coord2f(leftMostV[0], leftMostV[1]);
420 // glNormal3fv(leftMostNormal);
421 // glVertex3fv(leftMostXYZ);
422 
423  for(k=n_upper-1; k>=i; k--) /*reverse order for two-side lighting*/
424  {
425  coord2f(upper_val[k], v_upper);
426 // glNormal3fv(upperNormal[k]);
427 // glVertex3fv(upperXYZ[k]);
428  }
429 
430  endtfan();
431  }
432  break; /*exit the main loop*/
433  }
434  else /* case3: neither is empty, plus the leftMostV, there is at least one triangle to output*/
435  {
436  if(upper_val[i] <= lower_val[j])
437  {
438  bgntfan();
439  coord2f(lower_val[j], v_lower);
440 // glNormal3fv(lowerNormal[j]);
441 // glVertex3fv(lowerXYZ[j]);
442 
443  /*find the last k>=i such that
444  *upperverts[k][0] <= lowerverts[j][0]
445  */
446  k=i;
447 
448  while(k<n_upper)
449  {
450  if(upper_val[k] > lower_val[j])
451  break;
452  k++;
453 
454  }
455  k--;
456 
457 
458  for(l=k; l>=i; l--)/*the reverse is for two-side lighting*/
459  {
460  coord2f(upper_val[l], v_upper);
461 // glNormal3fv(upperNormal[l]);
462 // glVertex3fv(upperXYZ[l]);
463 
464  }
465  coord2f(leftMostV[0], leftMostV[1]);
466 // glNormal3fv(leftMostNormal);
467 // glVertex3fv(leftMostXYZ);
468 
469  endtfan();
470 
471  /*update i and leftMostV for next loop
472  */
473  i = k+1;
474 
475  leftMostV[0] = upper_val[k];
476  leftMostV[1] = v_upper;
477 // leftMostNormal = upperNormal[k];
478 // leftMostXYZ = upperXYZ[k];
479  }
480  else /*upperVerts[i][0] > lowerVerts[j][0]*/
481  {
482  bgntfan();
483  coord2f(upper_val[i], v_upper);
484 // glNormal3fv(upperNormal[i]);
485 // glVertex3fv(upperXYZ[i]);
486 
487  coord2f(leftMostV[0], leftMostV[1]);
488 // glNormal3fv(leftMostNormal);
489 // glVertex3fv(leftMostXYZ);
490 
491 
492  /*find the last k>=j such that
493  *lowerverts[k][0] < upperverts[i][0]
494  */
495  k=j;
496  while(k< n_lower)
497  {
498  if(lower_val[k] >= upper_val[i])
499  break;
500  coord2f(lower_val[k], v_lower);
501 // glNormal3fv(lowerNormal[k]);
502 // glVertex3fv(lowerXYZ[k]);
503 
504  k++;
505  }
506  endtfan();
507 
508  /*update j and leftMostV for next loop
509  */
510  j=k;
511  leftMostV[0] = lower_val[j-1];
512  leftMostV[1] = v_lower;
513 
514 // leftMostNormal = lowerNormal[j-1];
515 // leftMostXYZ = lowerXYZ[j-1];
516  }
517  }
518  }
519  //clean up
520 // free(upperXYZ);
521 // free(lowerXYZ);
522 // free(upperNormal);
523 // free(lowerNormal);
524 #endif
525 
526 }
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
void coord2f(REAL, REAL)
Definition: glsurfeval.cc:1106
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
r l[0]
Definition: byte_order.h:167
void inEvalUStrip(int n_upper, REAL v_upper, REAL *upper_val, int n_lower, REAL v_lower, REAL *lower_val)
Definition: insurfeval.cc:1166
float REAL
Definition: types.h:41
int k
Definition: mpi.c:3369

◆ evalVStrip()

void OpenGLSurfaceEvaluator::evalVStrip ( int  n_left,
REAL  u_left,
REAL left_val,
int  n_right,
REAL  u_right,
REAL right_val 
)
virtual

Implements BasicSurfaceEvaluator.

Definition at line 530 of file glsurfeval.cc.

531 {
532 #ifdef USE_INTERNAL_EVAL
533  inEvalVStrip(n_left, u_left, left_val,
534  n_right, u_right, right_val);
535 #else
536 
537 #ifdef FOR_CHRIS
538  evalVStripExt(n_left, u_left, left_val,
539  n_right, u_right, right_val);
540  return;
541 
542 #endif
543 
544  int i,j,k,l;
545  REAL botMostV[2];
546  /*
547  *the algorithm works by scanning from bot to top.
548  *botMostV: the bot most of the remaining verteces (on both left and right).
549  * it could an element of leftVerts or rightVerts.
550  *i: leftVerts[i] is the first vertex to the top of botMostV on left line
551  *j: rightVerts[j] is the first vertex to the top of botMostV on rightline
552  */
553 
554  /*initialize i,j,and botMostV
555  */
556  if(left_val[0] <= right_val[0])
557  {
558  i=1;
559  j=0;
560 
561  botMostV[0] = u_left;
562  botMostV[1] = left_val[0];
563  }
564  else
565  {
566  i=0;
567  j=1;
568 
569  botMostV[0] = u_right;
570  botMostV[1] = right_val[0];
571  }
572 
573  /*the main loop.
574  *the invariance is that:
575  *at the beginning of each loop, the meaning of i,j,and botMostV are
576  *maintained
577  */
578  while(1)
579  {
580  if(i >= n_left) /*case1: no more in left*/
581  {
582  if(j<n_right-1) /*at least two vertices in right*/
583  {
584  bgntfan();
585  coord2f(botMostV[0], botMostV[1]);
586  while(j<n_right){
587  coord2f(u_right, right_val[j]);
588 // glNormal3fv(rightNormal[j]);
589 // glVertex3fv(rightXYZ[j]);
590  j++;
591 
592  }
593  endtfan();
594  }
595  break; /*exit the main loop*/
596  }
597  else if(j>= n_right) /*case2: no more in right*/
598  {
599  if(i<n_left-1) /*at least two vertices in left*/
600  {
601  bgntfan();
602  coord2f(botMostV[0], botMostV[1]);
603 // glNormal3fv(botMostNormal);
604 // glVertex3fv(botMostXYZ);
605 
606  for(k=n_left-1; k>=i; k--) /*reverse order for two-side lighting*/
607  {
608  coord2f(u_left, left_val[k]);
609 // glNormal3fv(leftNormal[k]);
610 // glVertex3fv(leftXYZ[k]);
611  }
612 
613  endtfan();
614  }
615  break; /*exit the main loop*/
616  }
617  else /* case3: neither is empty, plus the botMostV, there is at least one triangle to output*/
618  {
619  if(left_val[i] <= right_val[j])
620  {
621  bgntfan();
622  coord2f(u_right, right_val[j]);
623 // glNormal3fv(rightNormal[j]);
624 // glVertex3fv(rightXYZ[j]);
625 
626  /*find the last k>=i such that
627  *leftverts[k][0] <= rightverts[j][0]
628  */
629  k=i;
630 
631  while(k<n_left)
632  {
633  if(left_val[k] > right_val[j])
634  break;
635  k++;
636 
637  }
638  k--;
639 
640 
641  for(l=k; l>=i; l--)/*the reverse is for two-side lighting*/
642  {
643  coord2f(u_left, left_val[l]);
644 // glNormal3fv(leftNormal[l]);
645 // glVertex3fv(leftXYZ[l]);
646 
647  }
648  coord2f(botMostV[0], botMostV[1]);
649 // glNormal3fv(botMostNormal);
650 // glVertex3fv(botMostXYZ);
651 
652  endtfan();
653 
654  /*update i and botMostV for next loop
655  */
656  i = k+1;
657 
658  botMostV[0] = u_left;
659  botMostV[1] = left_val[k];
660 // botMostNormal = leftNormal[k];
661 // botMostXYZ = leftXYZ[k];
662  }
663  else /*left_val[i] > right_val[j])*/
664  {
665  bgntfan();
666  coord2f(u_left, left_val[i]);
667 // glNormal3fv(leftNormal[i]);
668 // glVertex3fv(leftXYZ[i]);
669 
670  coord2f(botMostV[0], botMostV[1]);
671 // glNormal3fv(botMostNormal);
672 // glVertex3fv(botMostXYZ);
673 
674 
675  /*find the last k>=j such that
676  *rightverts[k][0] < leftverts[i][0]
677  */
678  k=j;
679  while(k< n_right)
680  {
681  if(right_val[k] >= left_val[i])
682  break;
683  coord2f(u_right, right_val[k]);
684 // glNormal3fv(rightNormal[k]);
685 // glVertex3fv(rightXYZ[k]);
686 
687  k++;
688  }
689  endtfan();
690 
691  /*update j and botMostV for next loop
692  */
693  j=k;
694  botMostV[0] = u_right;
695  botMostV[1] = right_val[j-1];
696 
697 // botMostNormal = rightNormal[j-1];
698 // botMostXYZ = rightXYZ[j-1];
699  }
700  }
701  }
702  //clean up
703 // free(leftXYZ);
704 // free(leftNormal);
705 // free(rightXYZ);
706 // free(rightNormal);
707 #endif
708 }
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
void inEvalVStrip(int n_left, REAL u_left, REAL *left_val, int n_right, REAL u_right, REAL *right_val)
Definition: insurfeval.cc:1355
void coord2f(REAL, REAL)
Definition: glsurfeval.cc:1106
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
r l[0]
Definition: byte_order.h:167
float REAL
Definition: types.h:41
int k
Definition: mpi.c:3369

◆ get_callback_auto_normal()

int OpenGLSurfaceEvaluator::get_callback_auto_normal ( )
inline

Definition at line 163 of file glsurfeval.h.

164  {
165  return callback_auto_normal;
166  }

Referenced by GLUnurbs::get_callback_auto_normal().

◆ get_vertices_call_back()

int OpenGLSurfaceEvaluator::get_vertices_call_back ( )
inline

Definition at line 149 of file glsurfeval.h.

150  {
151  return output_triangles;
152  }

Referenced by GLUnurbs::get_vertices_call_back().

◆ inBPMEval()

void OpenGLSurfaceEvaluator::inBPMEval ( bezierPatchMesh bpm)
private

Definition at line 247 of file insurfeval.cc.

248 {
249  int i,j,k,l;
250  float u,v;
251 
252  int ustride = bpm->bpatch->dimension * bpm->bpatch->vorder;
253  int vstride = bpm->bpatch->dimension;
254  inMap2f(
256  bpm->bpatch->umin,
257  bpm->bpatch->umax,
258  ustride,
259  bpm->bpatch->uorder,
260  bpm->bpatch->vmin,
261  bpm->bpatch->vmax,
262  vstride,
263  bpm->bpatch->vorder,
264  bpm->bpatch->ctlpoints);
265 
266  bpm->vertex_array = (float*) malloc(sizeof(float)* (bpm->index_UVarray/2) * 3+1); /*in case the origional dimenion is 4, then we need 4 space to pass to evaluator.*/
267  assert(bpm->vertex_array);
268  bpm->normal_array = (float*) malloc(sizeof(float)* (bpm->index_UVarray/2) * 3);
269  assert(bpm->normal_array);
270 #ifdef CRACK_TEST
271 if( global_ev_u1 ==2 && global_ev_u2 == 3
272  && global_ev_v1 ==2 && global_ev_v2 == 3)
273 {
274 REAL vertex[4];
275 REAL normal[4];
276 #ifdef DEBUG
277 printf("***number 1\n");
278 #endif
279 
281 inEvalCoord2f(3.0, 3.0);
282 inEvalCoord2f(2.0, 3.0);
283 inEvalCoord2f(3.0, 2.7);
284 inEvalCoord2f(2.0, 2.7);
285 inEvalCoord2f(3.0, 2.0);
286 inEvalCoord2f(2.0, 2.0);
288 
289 
291 inEvalCoord2f(2.0, 3.0);
292 inEvalCoord2f(2.0, 2.0);
293 inEvalCoord2f(2.0, 2.7);
295 
296 }
297 
298 /*
299 if( global_ev_u1 ==2 && global_ev_u2 == 3
300  && global_ev_v1 ==1 && global_ev_v2 == 2)
301 {
302 #ifdef DEBUG
303 printf("***number 2\n");
304 #endif
305 beginCallBack(GL_QUAD_STRIP);
306 inEvalCoord2f(2.0, 2.0);
307 inEvalCoord2f(2.0, 1.0);
308 inEvalCoord2f(3.0, 2.0);
309 inEvalCoord2f(3.0, 1.0);
310 endCallBack();
311 }
312 */
313 if( global_ev_u1 ==1 && global_ev_u2 == 2
314  && global_ev_v1 ==2 && global_ev_v2 == 3)
315 {
316 #ifdef DEBUG
317 printf("***number 3\n");
318 #endif
320 inEvalCoord2f(2.0, 3.0);
321 inEvalCoord2f(1.0, 3.0);
322 inEvalCoord2f(2.0, 2.3);
323 inEvalCoord2f(1.0, 2.3);
324 inEvalCoord2f(2.0, 2.0);
325 inEvalCoord2f(1.0, 2.0);
327 
329 inEvalCoord2f(2.0, 2.3);
330 inEvalCoord2f(2.0, 2.0);
331 inEvalCoord2f(2.0, 3.0);
333 
334 }
335 return;
336 #endif
337 
338  k=0;
339  l=0;
340 
341  for(i=0; i<bpm->index_length_array; i++)
342  {
344  for(j=0; j<bpm->length_array[i]; j++)
345  {
346  u = bpm->UVarray[k];
347  v = bpm->UVarray[k+1];
349  bpm->vertex_array+l,
350  bpm->normal_array+l);
351 
354 
355  k += 2;
356  l += 3;
357  }
359  }
360 }
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
void inMap2f(int k, REAL ulower, REAL uupper, int ustride, int uorder, REAL vlower, REAL vupper, int vstride, int vorder, REAL *ctlPoints)
Definition: insurfeval.cc:444
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint vstride
Definition: glext.h:8308
float * ctlpoints
Definition: bezierPatch.h:58
GLdouble GLdouble GLint ustride
Definition: glext.h:8308
Definition: mesh.c:4557
void inEvalCoord2f(REAL u, REAL v)
Definition: insurfeval.cc:375
void inDoEvalCoord2NOGE(REAL u, REAL v, REAL *retPoint, REAL *retNormal)
Definition: insurfeval.cc:749
#define assert(x)
Definition: debug.h:53
float vmin
Definition: bezierPatch.h:37
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
void normalCallBack(const GLfloat *normal, void *data)
Definition: glsurfeval.cc:1265
smooth NULL
Definition: ftsmooth.c:416
#define GL_MAP2_VERTEX_4
Definition: gl.h:568
void vertexCallBack(const GLfloat *vert, void *data)
Definition: glsurfeval.cc:1255
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
r l[0]
Definition: byte_order.h:167
float umax
Definition: bezierPatch.h:37
float vmax
Definition: bezierPatch.h:37
#define GL_MAP2_VERTEX_3
Definition: gl.h:567
bezierPatch * bpatch
#define GL_QUAD_STRIP
Definition: gl.h:198
const GLdouble * v
Definition: gl.h:2040
void beginCallBack(GLenum type, void *data)
Definition: glsurfeval.cc:1237
float umin
Definition: bezierPatch.h:37
void endCallBack(void *data)
Definition: glsurfeval.cc:1246
#define malloc
Definition: debug_ros.c:4
#define GL_TRIANGLE_STRIP
Definition: gl.h:195
float REAL
Definition: types.h:41
int k
Definition: mpi.c:3369
#define printf
Definition: config.h:203

Referenced by inBPMListEval().

◆ inBPMEvalEM()

void OpenGLSurfaceEvaluator::inBPMEvalEM ( bezierPatchMesh bpm)
private

Definition at line 1826 of file insurfeval.cc.

1827 {
1828  int i,j,k;
1829  float u,v;
1830 
1831  int ustride;
1832  int vstride;
1833 
1834 #ifdef USE_LOD
1835  if(bpm->bpatch != NULL)
1836  {
1837  bezierPatch* p=bpm->bpatch;
1838  ustride = p->dimension * p->vorder;
1839  vstride = p->dimension;
1840 
1841  glMap2f( (p->dimension == 3)? GL_MAP2_VERTEX_3 : GL_MAP2_VERTEX_4,
1842  p->umin,
1843  p->umax,
1844  ustride,
1845  p->uorder,
1846  p->vmin,
1847  p->vmax,
1848  vstride,
1849  p->vorder,
1850  p->ctlpoints);
1851 
1852 
1853 /*
1854  inMap2fEM(0, p->dimension,
1855  p->umin,
1856  p->umax,
1857  ustride,
1858  p->uorder,
1859  p->vmin,
1860  p->vmax,
1861  vstride,
1862  p->vorder,
1863  p->ctlpoints);
1864 */
1865  }
1866 #else
1867 
1868  if(bpm->bpatch != NULL){
1869  bezierPatch* p = bpm->bpatch;
1870  ustride = p->dimension * p->vorder;
1871  vstride = p->dimension;
1872  inMap2fEM(0, p->dimension,
1873  p->umin,
1874  p->umax,
1875  ustride,
1876  p->uorder,
1877  p->vmin,
1878  p->vmax,
1879  vstride,
1880  p->vorder,
1881  p->ctlpoints);
1882  }
1883  if(bpm->bpatch_normal != NULL){
1884  bezierPatch* p = bpm->bpatch_normal;
1885  ustride = p->dimension * p->vorder;
1886  vstride = p->dimension;
1887  inMap2fEM(1, p->dimension,
1888  p->umin,
1889  p->umax,
1890  ustride,
1891  p->uorder,
1892  p->vmin,
1893  p->vmax,
1894  vstride,
1895  p->vorder,
1896  p->ctlpoints);
1897  }
1898  if(bpm->bpatch_color != NULL){
1899  bezierPatch* p = bpm->bpatch_color;
1900  ustride = p->dimension * p->vorder;
1901  vstride = p->dimension;
1902  inMap2fEM(2, p->dimension,
1903  p->umin,
1904  p->umax,
1905  ustride,
1906  p->uorder,
1907  p->vmin,
1908  p->vmax,
1909  vstride,
1910  p->vorder,
1911  p->ctlpoints);
1912  }
1913  if(bpm->bpatch_texcoord != NULL){
1914  bezierPatch* p = bpm->bpatch_texcoord;
1915  ustride = p->dimension * p->vorder;
1916  vstride = p->dimension;
1917  inMap2fEM(3, p->dimension,
1918  p->umin,
1919  p->umax,
1920  ustride,
1921  p->uorder,
1922  p->vmin,
1923  p->vmax,
1924  vstride,
1925  p->vorder,
1926  p->ctlpoints);
1927  }
1928 #endif
1929 
1930 
1931  k=0;
1932  for(i=0; i<bpm->index_length_array; i++)
1933  {
1934 #ifdef USE_LOD
1935  if(bpm->type_array[i] == GL_POLYGON) //a mesh
1936  {
1937  GLfloat *temp = bpm->UVarray+k;
1938  GLfloat u0 = temp[0];
1939  GLfloat v0 = temp[1];
1940  GLfloat u1 = temp[2];
1941  GLfloat v1 = temp[3];
1942  GLint nu = (GLint) ( temp[4]);
1943  GLint nv = (GLint) ( temp[5]);
1944  GLint umin = (GLint) ( temp[6]);
1945  GLint vmin = (GLint) ( temp[7]);
1946  GLint umax = (GLint) ( temp[8]);
1947  GLint vmax = (GLint) ( temp[9]);
1948 
1951  }
1952  else
1953  {
1954  LOD_eval(bpm->length_array[i], bpm->UVarray+k, bpm->type_array[i],
1955  0
1956  );
1957  }
1958  k+= 2*bpm->length_array[i];
1959 
1960 #else //undef USE_LOD
1961 
1962 #ifdef CRACK_TEST
1963 if( bpm->bpatch->umin == 2 && bpm->bpatch->umax == 3
1964  && bpm->bpatch->vmin ==2 && bpm->bpatch->vmax == 3)
1965 {
1966 REAL vertex[4];
1967 REAL normal[4];
1968 #ifdef DEBUG
1969 printf("***number ****1\n");
1970 #endif
1971 
1973 inDoEvalCoord2EM(3.0, 3.0);
1974 inDoEvalCoord2EM(2.0, 3.0);
1975 inDoEvalCoord2EM(3.0, 2.7);
1976 inDoEvalCoord2EM(2.0, 2.7);
1977 inDoEvalCoord2EM(3.0, 2.0);
1978 inDoEvalCoord2EM(2.0, 2.0);
1979 endCallBack(NULL);
1980 
1982 inDoEvalCoord2EM(2.0, 3.0);
1983 inDoEvalCoord2EM(2.0, 2.0);
1984 inDoEvalCoord2EM(2.0, 2.7);
1985 endCallBack(NULL);
1986 
1987 }
1988 if( bpm->bpatch->umin == 1 && bpm->bpatch->umax == 2
1989  && bpm->bpatch->vmin ==2 && bpm->bpatch->vmax == 3)
1990 {
1991 #ifdef DEBUG
1992 printf("***number 3\n");
1993 #endif
1995 inDoEvalCoord2EM(2.0, 3.0);
1996 inDoEvalCoord2EM(1.0, 3.0);
1997 inDoEvalCoord2EM(2.0, 2.3);
1998 inDoEvalCoord2EM(1.0, 2.3);
1999 inDoEvalCoord2EM(2.0, 2.0);
2000 inDoEvalCoord2EM(1.0, 2.0);
2001 endCallBack(NULL);
2002 
2004 inDoEvalCoord2EM(2.0, 2.3);
2005 inDoEvalCoord2EM(2.0, 2.0);
2006 inDoEvalCoord2EM(2.0, 3.0);
2007 endCallBack(NULL);
2008 
2009 }
2010 return;
2011 #endif //CRACK_TEST
2012 
2014 
2015  for(j=0; j<bpm->length_array[i]; j++)
2016  {
2017  u = bpm->UVarray[k];
2018  v = bpm->UVarray[k+1];
2019 #ifdef USE_LOD
2020  LOD_EVAL_COORD(u,v);
2021 // glEvalCoord2f(u,v);
2022 #else
2023 
2024 #ifdef GENERIC_TEST
2025  float temp_normal[3];
2026  float temp_vertex[3];
2027  if(temp_signal == 0)
2028  {
2029  gTessVertexSphere(u,v, temp_normal, temp_vertex);
2030 //printf("normal=(%f,%f,%f)\n", temp_normal[0], temp_normal[1], temp_normal[2])//printf("veretx=(%f,%f,%f)\n", temp_vertex[0], temp_vertex[1], temp_vertex[2]);
2031  normalCallBack(temp_normal, userData);
2032  vertexCallBack(temp_vertex, userData);
2033  }
2034  else if(temp_signal == 1)
2035  {
2036  gTessVertexCyl(u,v, temp_normal, temp_vertex);
2037 //printf("normal=(%f,%f,%f)\n", temp_normal[0], temp_normal[1], temp_normal[2])//printf("veretx=(%f,%f,%f)\n", temp_vertex[0], temp_vertex[1], temp_vertex[2]);
2038  normalCallBack(temp_normal, userData);
2039  vertexCallBack(temp_vertex, userData);
2040  }
2041  else
2042 #endif //GENERIC_TEST
2043 
2044  inDoEvalCoord2EM(u,v);
2045 
2046 #endif //USE_LOD
2047 
2048  k += 2;
2049  }
2051 
2052 #endif //USE_LOD
2053  }
2054 }
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
bezierPatch * bpatch_color
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint vstride
Definition: glext.h:8308
GLdouble GLdouble GLint ustride
Definition: glext.h:8308
Definition: mesh.c:4557
GLAPI void GLAPIENTRY glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)
bezierPatch * bpatch_normal
GLfloat v0
Definition: glext.h:6061
GLdouble u1
Definition: glext.h:8308
float vmin
Definition: bezierPatch.h:37
void LOD_eval(int num_vert, REAL *verts, int type, int level)
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
void inMap2fEM(int which, int dimension, REAL ulower, REAL uupper, int ustride, int uorder, REAL vlower, REAL vupper, int vstride, int vorder, REAL *ctlPoints)
Definition: insurfeval.cc:1540
void normalCallBack(const GLfloat *normal, void *data)
Definition: glsurfeval.cc:1265
smooth NULL
Definition: ftsmooth.c:416
#define GL_MAP2_VERTEX_4
Definition: gl.h:568
void vertexCallBack(const GLfloat *vert, void *data)
Definition: glsurfeval.cc:1255
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
float umax
Definition: bezierPatch.h:37
GLAPI void GLAPIENTRY glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
float vmax
Definition: bezierPatch.h:37
#define GL_MAP2_VERTEX_3
Definition: gl.h:567
void inDoEvalCoord2EM(REAL u, REAL v)
Definition: insurfeval.cc:1702
bezierPatch * bpatch
bezierPatch * bpatch_texcoord
#define GL_QUAD_STRIP
Definition: gl.h:198
#define GL_FILL
Definition: gl.h:267
const GLdouble * v
Definition: gl.h:2040
static calc_node_t temp
Definition: rpn_ieee.c:38
#define GL_POLYGON
Definition: gl.h:199
void beginCallBack(GLenum type, void *data)
Definition: glsurfeval.cc:1237
float umin
Definition: bezierPatch.h:37
float GLfloat
Definition: gl.h:161
void endCallBack(void *data)
Definition: glsurfeval.cc:1246
int GLint
Definition: gl.h:156
#define GL_TRIANGLE_STRIP
Definition: gl.h:195
GLfloat GLfloat p
Definition: glext.h:8902
float REAL
Definition: types.h:41
GLfloat GLfloat v1
Definition: glext.h:6062
int k
Definition: mpi.c:3369
GLAPI void GLAPIENTRY glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
#define printf
Definition: config.h:203

Referenced by inBPMListEvalEM().

◆ inBPMListEval()

void OpenGLSurfaceEvaluator::inBPMListEval ( bezierPatchMesh list)
private

Definition at line 238 of file insurfeval.cc.

239 {
241  for(temp = list; temp != NULL; temp = temp->next)
242  {
243  inBPMEval(temp);
244  }
245 }
smooth NULL
Definition: ftsmooth.c:416
Definition: _list.h:228
static calc_node_t temp
Definition: rpn_ieee.c:38
void inBPMEval(bezierPatchMesh *bpm)
Definition: insurfeval.cc:247

◆ inBPMListEvalEM()

void OpenGLSurfaceEvaluator::inBPMListEvalEM ( bezierPatchMesh list)
private

Definition at line 2056 of file insurfeval.cc.

2057 {
2059  for(temp = list; temp != NULL; temp = temp->next)
2060  {
2061  inBPMEvalEM(temp);
2062  }
2063 }
smooth NULL
Definition: ftsmooth.c:416
Definition: _list.h:228
static calc_node_t temp
Definition: rpn_ieee.c:38
void inBPMEvalEM(bezierPatchMesh *bpm)
Definition: insurfeval.cc:1826

Referenced by endmap2f(), and LOD_eval_list().

◆ inComputeFirstPartials()

void OpenGLSurfaceEvaluator::inComputeFirstPartials ( REAL p,
REAL pu,
REAL pv 
)
private

Definition at line 501 of file insurfeval.cc.

502 {
503  pu[0] = pu[0]*p[3] - pu[3]*p[0];
504  pu[1] = pu[1]*p[3] - pu[3]*p[1];
505  pu[2] = pu[2]*p[3] - pu[3]*p[2];
506 
507  pv[0] = pv[0]*p[3] - pv[3]*p[0];
508  pv[1] = pv[1]*p[3] - pv[3]*p[1];
509  pv[2] = pv[2]*p[3] - pv[3]*p[2];
510 }
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by inDoEvalCoord2(), inDoEvalCoord2EM(), inDoEvalCoord2NOGE(), inDoEvalCoord2NOGE_BU(), and inDoEvalCoord2NOGE_BV().

◆ inComputeNormal2()

void OpenGLSurfaceEvaluator::inComputeNormal2 ( REAL pu,
REAL pv,
REAL n 
)
private

Definition at line 518 of file insurfeval.cc.

519 {
520  REAL mag;
521 
522  n[0] = pu[1]*pv[2] - pu[2]*pv[1];
523  n[1] = pu[2]*pv[0] - pu[0]*pv[2];
524  n[2] = pu[0]*pv[1] - pu[1]*pv[0];
525 
526  mag = sqrt(n[0]*n[0] + n[1]*n[1] + n[2]*n[2]);
527 
528  if (mag > 0.0) {
529  n[0] /= mag;
530  n[1] /= mag;
531  n[2] /= mag;
532  }
533 }
_STLP_DECLSPEC complex< float > _STLP_CALL sqrt(const complex< float > &)
Definition: complex.cpp:188
GLdouble n
Definition: glext.h:7729
float REAL
Definition: types.h:41

Referenced by inDoEvalCoord2(), inDoEvalCoord2EM(), inDoEvalCoord2NOGE(), inDoEvalCoord2NOGE_BU(), and inDoEvalCoord2NOGE_BV().

◆ inDoDomain2EM()

void OpenGLSurfaceEvaluator::inDoDomain2EM ( surfEvalMachine em,
REAL  u,
REAL  v,
REAL retPoint 
)
private

Definition at line 1653 of file insurfeval.cc.

1655 {
1656  int j, row, col;
1657  REAL the_uprime;
1658  REAL the_vprime;
1659  REAL p;
1660  REAL *data;
1661 
1662  if((em->u2 == em->u1) || (em->v2 == em->v1))
1663  return;
1664  the_uprime = (u - em->u1) / (em->u2 - em->u1);
1665  the_vprime = (v - em->v1) / (em->v2 - em->v1);
1666 
1667  /* Compute coefficients for values and derivs */
1668 
1669  /* Use already cached values if possible */
1670  if(em->uprime != the_uprime) {
1671  inPreEvaluate(em->uorder, the_uprime, em->ucoeff);
1672  em->uprime = the_uprime;
1673  }
1674  if (em->vprime != the_vprime) {
1675  inPreEvaluate(em->vorder, the_vprime, em->vcoeff);
1676  em->vprime = the_vprime;
1677  }
1678 
1679  for (j = 0; j < em->k; j++) {
1680  data=em->ctlPoints+j;
1681  retPoint[j] = 0.0;
1682  for (row = 0; row < em->uorder; row++) {
1683  /*
1684  ** Minor optimization.
1685  ** The col == 0 part of the loop is extracted so we don't
1686  ** have to initialize p and pdv to 0.
1687  */
1688  p = em->vcoeff[0] * (*data);
1689  data += em->k;
1690  for (col = 1; col < em->vorder; col++) {
1691  /* Incrementally build up p, pdv value */
1692  p += em->vcoeff[col] * (*data);
1693  data += em->k;
1694  }
1695  /* Use p, pdv value to incrementally add up r, du, dv */
1696  retPoint[j] += em->ucoeff[row] * p;
1697  }
1698  }
1699 }
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
REAL ctlPoints[IN_MAX_BEZIER_ORDER *IN_MAX_BEZIER_ORDER *IN_MAX_DIMENSION]
Definition: glsurfeval.h:75
REAL vcoeff[IN_MAX_BEZIER_ORDER]
Definition: glsurfeval.h:77
REAL ucoeff[IN_MAX_BEZIER_ORDER]
Definition: glsurfeval.h:76
void inPreEvaluate(int order, REAL vprime, REAL *coeff)
Definition: insurfeval.cc:1022
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
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
const GLdouble * v
Definition: gl.h:2040
GLfloat GLfloat p
Definition: glext.h:8902
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

Referenced by inDoEvalCoord2EM().

◆ inDoDomain2WithDerivs()

void OpenGLSurfaceEvaluator::inDoDomain2WithDerivs ( int  k,
REAL  u,
REAL  v,
REAL  u1,
REAL  u2,
int  uorder,
REAL  v1,
REAL  v2,
int  vorder,
REAL baseData,
REAL retPoint,
REAL retdu,
REAL retdv 
)
private

Definition at line 949 of file insurfeval.cc.

954 {
955  int j, row, col;
956  REAL uprime;
957  REAL vprime;
958  REAL p;
959  REAL pdv;
960  REAL *data;
961 
962  if((u2 == u1) || (v2 == v1))
963  return;
964  uprime = (u - u1) / (u2 - u1);
965  vprime = (v - v1) / (v2 - v1);
966 
967  /* Compute coefficients for values and derivs */
968 
969  /* Use already cached values if possible */
970  if(global_uprime != uprime || global_uorder != uorder) {
973  global_uprime = uprime;
974  }
975  if (global_vprime != vprime ||
976  global_vorder != vorder) {
979  global_vprime = vprime;
980  }
981 
982  for (j = 0; j < k; j++) {
983  data=baseData+j;
984  retPoint[j] = retdu[j] = retdv[j] = 0.0;
985  for (row = 0; row < uorder; row++) {
986  /*
987  ** Minor optimization.
988  ** The col == 0 part of the loop is extracted so we don't
989  ** have to initialize p and pdv to 0.
990  */
991  p = global_vcoeff[0] * (*data);
992  pdv = global_vcoeffDeriv[0] * (*data);
993  data += k;
994  for (col = 1; col < vorder; col++) {
995  /* Incrementally build up p, pdv value */
996  p += global_vcoeff[col] * (*data);
997  pdv += global_vcoeffDeriv[col] * (*data);
998  data += k;
999  }
1000  /* Use p, pdv value to incrementally add up r, du, dv */
1001  retPoint[j] += global_ucoeff[row] * p;
1002  retdu[j] += global_ucoeffDeriv[row] * p;
1003  retdv[j] += global_ucoeff[row] * pdv;
1004  }
1005  }
1006 }
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
REAL global_vcoeffDeriv[IN_MAX_BEZIER_ORDER]
Definition: glsurfeval.h:245
GLdouble GLdouble u2
Definition: glext.h:8308
_In_ ULONG_PTR _In_opt_ DESIGNVECTOR * pdv
Definition: winddi.h:3723
void inPreEvaluateWithDeriv(int order, REAL vprime, REAL *coeff, REAL *coeffDeriv)
Definition: insurfeval.cc:1066
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint vorder
Definition: glext.h:8308
GLdouble u1
Definition: glext.h:8308
REAL global_ucoeff[IN_MAX_BEZIER_ORDER]
Definition: glsurfeval.h:242
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
GLdouble GLdouble GLint GLint uorder
Definition: glext.h:8308
REAL global_vcoeff[IN_MAX_BEZIER_ORDER]
Definition: glsurfeval.h:243
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLfloat GLfloat GLfloat v2
Definition: glext.h:6063
const GLdouble * v
Definition: gl.h:2040
REAL global_ucoeffDeriv[IN_MAX_BEZIER_ORDER]
Definition: glsurfeval.h:244
GLfloat GLfloat p
Definition: glext.h:8902
float REAL
Definition: types.h:41
GLfloat GLfloat v1
Definition: glext.h:6062
int k
Definition: mpi.c:3369
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

Referenced by inDoEvalCoord2(), inDoEvalCoord2NOGE(), inDoEvalCoord2NOGE_BU(), and inDoEvalCoord2NOGE_BV().

◆ inDoDomain2WithDerivsBU()

void OpenGLSurfaceEvaluator::inDoDomain2WithDerivsBU ( int  k,
REAL  u,
REAL  v,
REAL  u1,
REAL  u2,
int  uorder,
REAL  v1,
REAL  v2,
int  vorder,
REAL baseData,
REAL retPoint,
REAL retdu,
REAL retdv 
)
private

Definition at line 868 of file insurfeval.cc.

873 {
874  int j, col;
875 
876  REAL vprime;
877 
878 
879  if((u2 == u1) || (v2 == v1))
880  return;
881 
882  vprime = (v - v1) / (v2 - v1);
883 
884 
885  if(global_vprime != vprime || global_vorder != vorder) {
887  global_vprime = vprime;
889  }
890 
891 
892  for(j=0; j<k; j++)
893  {
894  retPoint[j] = retdu[j] = retdv[j] = 0.0;
895  for (col = 0; col < vorder; col++) {
896  retPoint[j] += global_BU[col][j] * global_vcoeff[col];
897  retdu[j] += global_PBU[col][j] * global_vcoeff[col];
898  retdv[j] += global_BU[col][j] * global_vcoeffDeriv[col];
899  }
900  }
901 }
REAL global_vcoeffDeriv[IN_MAX_BEZIER_ORDER]
Definition: glsurfeval.h:245
GLdouble GLdouble u2
Definition: glext.h:8308
void inPreEvaluateWithDeriv(int order, REAL vprime, REAL *coeff, REAL *coeffDeriv)
Definition: insurfeval.cc:1066
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint vorder
Definition: glext.h:8308
GLdouble u1
Definition: glext.h:8308
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 global_PBU[IN_MAX_BEZIER_ORDER][IN_MAX_DIMENSION]
Definition: glsurfeval.h:250
REAL global_vcoeff[IN_MAX_BEZIER_ORDER]
Definition: glsurfeval.h:243
GLfloat GLfloat GLfloat v2
Definition: glext.h:6063
const GLdouble * v
Definition: gl.h:2040
float REAL
Definition: types.h:41
GLfloat GLfloat v1
Definition: glext.h:6062
int k
Definition: mpi.c:3369
REAL global_BU[IN_MAX_BEZIER_ORDER][IN_MAX_DIMENSION]
Definition: glsurfeval.h:249

Referenced by inDoEvalCoord2NOGE_BU().

◆ inDoDomain2WithDerivsBV()

void OpenGLSurfaceEvaluator::inDoDomain2WithDerivsBV ( int  k,
REAL  u,
REAL  v,
REAL  u1,
REAL  u2,
int  uorder,
REAL  v1,
REAL  v2,
int  vorder,
REAL baseData,
REAL retPoint,
REAL retdu,
REAL retdv 
)
private

Definition at line 903 of file insurfeval.cc.

908 {
909  int j, row;
910  REAL uprime;
911 
912 
913  if((u2 == u1) || (v2 == v1))
914  return;
915  uprime = (u - u1) / (u2 - u1);
916 
917 
918  if(global_uprime != uprime || global_uorder != uorder) {
920  global_uprime = uprime;
922  }
923 
924 
925  for(j=0; j<k; j++)
926  {
927  retPoint[j] = retdu[j] = retdv[j] = 0.0;
928  for (row = 0; row < uorder; row++) {
929  retPoint[j] += global_BV[row][j] * global_ucoeff[row];
930  retdu[j] += global_BV[row][j] * global_ucoeffDeriv[row];
931  retdv[j] += global_PBV[row][j] * global_ucoeff[row];
932  }
933  }
934 }
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
GLdouble GLdouble u2
Definition: glext.h:8308
REAL global_BV[IN_MAX_BEZIER_ORDER][IN_MAX_DIMENSION]
Definition: glsurfeval.h:247
void inPreEvaluateWithDeriv(int order, REAL vprime, REAL *coeff, REAL *coeffDeriv)
Definition: insurfeval.cc:1066
GLdouble u1
Definition: glext.h:8308
REAL global_ucoeff[IN_MAX_BEZIER_ORDER]
Definition: glsurfeval.h:242
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
GLdouble GLdouble GLint GLint uorder
Definition: glext.h:8308
REAL global_PBV[IN_MAX_BEZIER_ORDER][IN_MAX_DIMENSION]
Definition: glsurfeval.h:248
GLfloat GLfloat GLfloat v2
Definition: glext.h:6063
REAL global_ucoeffDeriv[IN_MAX_BEZIER_ORDER]
Definition: glsurfeval.h:244
float REAL
Definition: types.h:41
GLfloat GLfloat v1
Definition: glext.h:6062
int k
Definition: mpi.c:3369
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

Referenced by inDoEvalCoord2NOGE_BV().

◆ inDoDomain2WithDerivsEM()

void OpenGLSurfaceEvaluator::inDoDomain2WithDerivsEM ( surfEvalMachine em,
REAL  u,
REAL  v,
REAL retPoint,
REAL retdu,
REAL retdv 
)
private

Definition at line 1600 of file insurfeval.cc.

1602 {
1603  int j, row, col;
1604  REAL the_uprime;
1605  REAL the_vprime;
1606  REAL p;
1607  REAL pdv;
1608  REAL *data;
1609 
1610  if((em->u2 == em->u1) || (em->v2 == em->v1))
1611  return;
1612  the_uprime = (u - em->u1) / (em->u2 - em->u1);
1613  the_vprime = (v - em->v1) / (em->v2 - em->v1);
1614 
1615  /* Compute coefficients for values and derivs */
1616 
1617  /* Use already cached values if possible */
1618  if(em->uprime != the_uprime) {
1619  inPreEvaluateWithDeriv(em->uorder, the_uprime, em->ucoeff, em->ucoeffDeriv);
1620  em->uprime = the_uprime;
1621  }
1622  if (em->vprime != the_vprime) {
1623  inPreEvaluateWithDeriv(em->vorder, the_vprime, em->vcoeff, em->vcoeffDeriv);
1624  em->vprime = the_vprime;
1625  }
1626 
1627  for (j = 0; j < em->k; j++) {
1628  data=em->ctlPoints+j;
1629  retPoint[j] = retdu[j] = retdv[j] = 0.0;
1630  for (row = 0; row < em->uorder; row++) {
1631  /*
1632  ** Minor optimization.
1633  ** The col == 0 part of the loop is extracted so we don't
1634  ** have to initialize p and pdv to 0.
1635  */
1636  p = em->vcoeff[0] * (*data);
1637  pdv = em->vcoeffDeriv[0] * (*data);
1638  data += em->k;
1639  for (col = 1; col < em->vorder; col++) {
1640  /* Incrementally build up p, pdv value */
1641  p += em->vcoeff[col] * (*data);
1642  pdv += em->vcoeffDeriv[col] * (*data);
1643  data += em->k;
1644  }
1645  /* Use p, pdv value to incrementally add up r, du, dv */
1646  retPoint[j] += em->ucoeff[row] * p;
1647  retdu[j] += em->ucoeffDeriv[row] * p;
1648  retdv[j] += em->ucoeff[row] * pdv;
1649  }
1650  }
1651 }
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
_In_ ULONG_PTR _In_opt_ DESIGNVECTOR * pdv
Definition: winddi.h:3723
REAL ctlPoints[IN_MAX_BEZIER_ORDER *IN_MAX_BEZIER_ORDER *IN_MAX_DIMENSION]
Definition: glsurfeval.h:75
void inPreEvaluateWithDeriv(int order, REAL vprime, REAL *coeff, REAL *coeffDeriv)
Definition: insurfeval.cc:1066
REAL vcoeff[IN_MAX_BEZIER_ORDER]
Definition: glsurfeval.h:77
REAL ucoeff[IN_MAX_BEZIER_ORDER]
Definition: glsurfeval.h:76
REAL vcoeffDeriv[IN_MAX_BEZIER_ORDER]
Definition: glsurfeval.h:79
REAL ucoeffDeriv[IN_MAX_BEZIER_ORDER]
Definition: glsurfeval.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
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
const GLdouble * v
Definition: gl.h:2040
GLfloat GLfloat p
Definition: glext.h:8902
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

Referenced by inDoEvalCoord2EM().

◆ inDoEvalCoord2()

void OpenGLSurfaceEvaluator::inDoEvalCoord2 ( REAL  u,
REAL  v,
REAL retPoint,
REAL retNormal 
)
private

Definition at line 541 of file insurfeval.cc.

543 {
544 
545  REAL du[4];
546  REAL dv[4];
547 
548 
549  assert(global_ev_k>=3 && global_ev_k <= 4);
550  /*compute homegeneous point and partial derivatives*/
552 
553 #ifdef AVOID_ZERO_NORMAL
554 
555  if(myabs(dv[0]) <= MYZERO && myabs(dv[1]) <= MYZERO && myabs(dv[2]) <= MYZERO)
556  {
557 
558  REAL tempdu[4];
559  REAL tempdata[4];
560  REAL u1 = global_ev_u1;
561  REAL u2 = global_ev_u2;
562  if(u-MYDELTA*(u2-u1) < u1)
563  u = u+ MYDELTA*(u2-u1);
564  else
565  u = u-MYDELTA*(u2-u1);
567  }
568  if(myabs(du[0]) <= MYZERO && myabs(du[1]) <= MYZERO && myabs(du[2]) <= MYZERO)
569  {
570  REAL tempdv[4];
571  REAL tempdata[4];
572  REAL v1 = global_ev_v1;
573  REAL v2 = global_ev_v2;
574  if(v-MYDELTA*(v2-v1) < v1)
575  v = v+ MYDELTA*(v2-v1);
576  else
577  v = v-MYDELTA*(v2-v1);
579  }
580 #endif
581 
582 
583  /*compute normal*/
584  switch(global_ev_k){
585  case 3:
586  inComputeNormal2(du, dv, retNormal);
587 
588  break;
589  case 4:
590  inComputeFirstPartials(retPoint, du, dv);
591  inComputeNormal2(du, dv, retNormal);
592  /*transform the homegeneous coordinate of retPoint into inhomogenous one*/
593  retPoint[0] /= retPoint[3];
594  retPoint[1] /= retPoint[3];
595  retPoint[2] /= retPoint[3];
596  break;
597  }
598  /*output this vertex*/
599 /* inMeshStreamInsert(global_ms, retPoint, retNormal);*/
600 
601 
602 
603  glNormal3fv(retNormal);
604  glVertex3fv(retPoint);
605 
606 
607 
608 
609  #ifdef DEBUG
610  printf("vertex(%f,%f,%f)\n", retPoint[0],retPoint[1],retPoint[2]);
611  #endif
612 
613 
614 
615 }
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
void inComputeNormal2(REAL *pu, REAL *pv, REAL *n)
Definition: insurfeval.cc:518
GLdouble GLdouble u2
Definition: glext.h:8308
GLAPI void GLAPIENTRY glNormal3fv(const GLfloat *v)
void inComputeFirstPartials(REAL *p, REAL *pu, REAL *pv)
Definition: insurfeval.cc:501
#define assert(x)
Definition: debug.h:53
GLdouble u1
Definition: glext.h:8308
void inDoDomain2WithDerivs(int k, REAL u, REAL v, REAL u1, REAL u2, int uorder, REAL v1, REAL v2, int vorder, REAL *baseData, REAL *retPoint, REAL *retdu, REAL *retdv)
Definition: insurfeval.cc:949
#define MYZERO
Definition: insurfeval.cc:55
GLfloat GLfloat GLfloat v2
Definition: glext.h:6063
GLAPI void GLAPIENTRY glVertex3fv(const GLfloat *v)
const GLdouble * v
Definition: gl.h:2040
REAL global_ev_ctlPoints[IN_MAX_BEZIER_ORDER *IN_MAX_BEZIER_ORDER *IN_MAX_DIMENSION]
Definition: glsurfeval.h:262
#define myabs(x)
Definition: insurfeval.cc:54
float REAL
Definition: types.h:41
#define MYDELTA
Definition: insurfeval.cc:56
GLfloat GLfloat v1
Definition: glext.h:6062
#define printf
Definition: config.h:203

Referenced by inEvalCoord2f(), inEvalMesh2(), and inEvalPoint2().

◆ inDoEvalCoord2EM()

void OpenGLSurfaceEvaluator::inDoEvalCoord2EM ( REAL  u,
REAL  v 
)
private

Definition at line 1702 of file insurfeval.cc.

1703 {
1704  REAL temp_vertex[5];
1705  REAL temp_normal[3];
1706  REAL temp_color[4];
1707  REAL temp_texcoord[4];
1708 
1709  if(texcoord_flag)
1710  {
1711  inDoDomain2EM(&em_texcoord, u,v, temp_texcoord);
1712  texcoordCallBack(temp_texcoord, userData);
1713  }
1714  if(color_flag)
1715  {
1716  inDoDomain2EM(&em_color, u,v, temp_color);
1717  colorCallBack(temp_color, userData);
1718  }
1719 
1720  if(normal_flag) //there is a normla map
1721  {
1722  inDoDomain2EM(&em_normal, u,v, temp_normal);
1723  normalCallBack(temp_normal, userData);
1724 
1725  if(vertex_flag)
1726  {
1727  inDoDomain2EM(&em_vertex, u,v,temp_vertex);
1728  if(em_vertex.k == 4)
1729  {
1730  temp_vertex[0] /= temp_vertex[3];
1731  temp_vertex[1] /= temp_vertex[3];
1732  temp_vertex[2] /= temp_vertex[3];
1733  }
1734  temp_vertex[3]=u;
1735  temp_vertex[4]=v;
1736  vertexCallBack(temp_vertex, userData);
1737  }
1738  }
1739  else if(auto_normal_flag) //no normal map but there is a normal callbackfunctin
1740  {
1741  REAL du[4];
1742  REAL dv[4];
1743 
1744  /*compute homegeneous point and partial derivatives*/
1745  inDoDomain2WithDerivsEM(&em_vertex, u,v,temp_vertex,du,dv);
1746 
1747  if(em_vertex.k ==4)
1748  inComputeFirstPartials(temp_vertex, du, dv);
1749 
1750 #ifdef AVOID_ZERO_NORMAL
1751  if(myabs(dv[0]) <= MYZERO && myabs(dv[1]) <= MYZERO && myabs(dv[2]) <= MYZERO)
1752  {
1753 
1754  REAL tempdu[4];
1755  REAL tempdata[4];
1756  REAL u1 = em_vertex.u1;
1757  REAL u2 = em_vertex.u2;
1758  if(u-MYDELTA*(u2-u1) < u1)
1759  u = u+ MYDELTA*(u2-u1);
1760  else
1761  u = u-MYDELTA*(u2-u1);
1762  inDoDomain2WithDerivsEM(&em_vertex,u,v, tempdata, tempdu, dv);
1763 
1764  if(em_vertex.k ==4)
1765  inComputeFirstPartials(temp_vertex, du, dv);
1766  }
1767  else if(myabs(du[0]) <= MYZERO && myabs(du[1]) <= MYZERO && myabs(du[2]) <= MYZERO)
1768  {
1769  REAL tempdv[4];
1770  REAL tempdata[4];
1771  REAL v1 = em_vertex.v1;
1772  REAL v2 = em_vertex.v2;
1773  if(v-MYDELTA*(v2-v1) < v1)
1774  v = v+ MYDELTA*(v2-v1);
1775  else
1776  v = v-MYDELTA*(v2-v1);
1777  inDoDomain2WithDerivsEM(&em_vertex,u,v, tempdata, du, tempdv);
1778 
1779  if(em_vertex.k ==4)
1780  inComputeFirstPartials(temp_vertex, du, dv);
1781  }
1782 #endif
1783 
1784  /*compute normal*/
1785  switch(em_vertex.k){
1786  case 3:
1787 
1788  inComputeNormal2(du, dv, temp_normal);
1789  break;
1790  case 4:
1791 
1792 // inComputeFirstPartials(temp_vertex, du, dv);
1793  inComputeNormal2(du, dv, temp_normal);
1794 
1795  /*transform the homegeneous coordinate of retPoint into inhomogenous one*/
1796  temp_vertex[0] /= temp_vertex[3];
1797  temp_vertex[1] /= temp_vertex[3];
1798  temp_vertex[2] /= temp_vertex[3];
1799  break;
1800  }
1801  normalCallBack(temp_normal, userData);
1802  temp_vertex[3] = u;
1803  temp_vertex[4] = v;
1804  vertexCallBack(temp_vertex, userData);
1805 
1806  }/*end if auto_normal*/
1807  else //no normal map, and no normal callback function
1808  {
1809  if(vertex_flag)
1810  {
1811  inDoDomain2EM(&em_vertex, u,v,temp_vertex);
1812  if(em_vertex.k == 4)
1813  {
1814  temp_vertex[0] /= temp_vertex[3];
1815  temp_vertex[1] /= temp_vertex[3];
1816  temp_vertex[2] /= temp_vertex[3];
1817  }
1818  temp_vertex[3] = u;
1819  temp_vertex[4] = v;
1820  vertexCallBack(temp_vertex, userData);
1821  }
1822  }
1823 }
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
void inComputeNormal2(REAL *pu, REAL *pv, REAL *n)
Definition: insurfeval.cc:518
GLdouble GLdouble u2
Definition: glext.h:8308
void inComputeFirstPartials(REAL *p, REAL *pu, REAL *pv)
Definition: insurfeval.cc:501
surfEvalMachine em_vertex
Definition: glsurfeval.h:349
surfEvalMachine em_color
Definition: glsurfeval.h:351
GLdouble u1
Definition: glext.h:8308
void colorCallBack(const GLfloat *color, void *data)
Definition: glsurfeval.cc:1274
void normalCallBack(const GLfloat *normal, void *data)
Definition: glsurfeval.cc:1265
void inDoDomain2EM(surfEvalMachine *em, REAL u, REAL v, REAL *retPoint)
Definition: insurfeval.cc:1653
void vertexCallBack(const GLfloat *vert, void *data)
Definition: glsurfeval.cc:1255
void texcoordCallBack(const GLfloat *texcoord, void *data)
Definition: glsurfeval.cc:1283
surfEvalMachine em_texcoord
Definition: glsurfeval.h:352
#define MYZERO
Definition: insurfeval.cc:55
GLfloat GLfloat GLfloat v2
Definition: glext.h:6063
void inDoDomain2WithDerivsEM(surfEvalMachine *em, REAL u, REAL v, REAL *retPoint, REAL *retdu, REAL *retdv)
Definition: insurfeval.cc:1600
const GLdouble * v
Definition: gl.h:2040
#define myabs(x)
Definition: insurfeval.cc:54
surfEvalMachine em_normal
Definition: glsurfeval.h:350
float REAL
Definition: types.h:41
#define MYDELTA
Definition: insurfeval.cc:56
GLfloat GLfloat v1
Definition: glext.h:6062

Referenced by inBPMEvalEM().

◆ inDoEvalCoord2NOGE()

void OpenGLSurfaceEvaluator::inDoEvalCoord2NOGE ( REAL  u,
REAL  v,
REAL retPoint,
REAL retNormal 
)
privatevirtual

Implements BasicSurfaceEvaluator.

Definition at line 749 of file insurfeval.cc.

751 {
752 
753  REAL du[4];
754  REAL dv[4];
755 
756 
757  assert(global_ev_k>=3 && global_ev_k <= 4);
758  /*compute homegeneous point and partial derivatives*/
760 
761 
762 #ifdef AVOID_ZERO_NORMAL
763 
764  if(myabs(dv[0]) <= MYZERO && myabs(dv[1]) <= MYZERO && myabs(dv[2]) <= MYZERO)
765  {
766 
767  REAL tempdu[4];
768  REAL tempdata[4];
769  REAL u1 = global_ev_u1;
770  REAL u2 = global_ev_u2;
771  if(u-MYDELTA*(u2-u1) < u1)
772  u = u+ MYDELTA*(u2-u1);
773  else
774  u = u-MYDELTA*(u2-u1);
776  }
777  if(myabs(du[0]) <= MYZERO && myabs(du[1]) <= MYZERO && myabs(du[2]) <= MYZERO)
778  {
779  REAL tempdv[4];
780  REAL tempdata[4];
781  REAL v1 = global_ev_v1;
782  REAL v2 = global_ev_v2;
783  if(v-MYDELTA*(v2-v1) < v1)
784  v = v+ MYDELTA*(v2-v1);
785  else
786  v = v-MYDELTA*(v2-v1);
788  }
789 #endif
790 
791  /*compute normal*/
792  switch(global_ev_k){
793  case 3:
794  inComputeNormal2(du, dv, retNormal);
795  break;
796  case 4:
797  inComputeFirstPartials(retPoint, du, dv);
798  inComputeNormal2(du, dv, retNormal);
799  /*transform the homegeneous coordinate of retPoint into inhomogenous one*/
800  retPoint[0] /= retPoint[3];
801  retPoint[1] /= retPoint[3];
802  retPoint[2] /= retPoint[3];
803  break;
804  }
805 // glNormal3fv(retNormal);
806 // glVertex3fv(retPoint);
807 }
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
void inComputeNormal2(REAL *pu, REAL *pv, REAL *n)
Definition: insurfeval.cc:518
GLdouble GLdouble u2
Definition: glext.h:8308
void inComputeFirstPartials(REAL *p, REAL *pu, REAL *pv)
Definition: insurfeval.cc:501
#define assert(x)
Definition: debug.h:53
GLdouble u1
Definition: glext.h:8308
void inDoDomain2WithDerivs(int k, REAL u, REAL v, REAL u1, REAL u2, int uorder, REAL v1, REAL v2, int vorder, REAL *baseData, REAL *retPoint, REAL *retdu, REAL *retdv)
Definition: insurfeval.cc:949
#define MYZERO
Definition: insurfeval.cc:55
GLfloat GLfloat GLfloat v2
Definition: glext.h:6063
const GLdouble * v
Definition: gl.h:2040
REAL global_ev_ctlPoints[IN_MAX_BEZIER_ORDER *IN_MAX_BEZIER_ORDER *IN_MAX_DIMENSION]
Definition: glsurfeval.h:262
#define myabs(x)
Definition: insurfeval.cc:54
float REAL
Definition: types.h:41
#define MYDELTA
Definition: insurfeval.cc:56
GLfloat GLfloat v1
Definition: glext.h:6062

Referenced by inBPMEval().

◆ inDoEvalCoord2NOGE_BU()

void OpenGLSurfaceEvaluator::inDoEvalCoord2NOGE_BU ( REAL  u,
REAL  v,
REAL retPoint,
REAL retNormal 
)
privatevirtual

Implements BasicSurfaceEvaluator.

Definition at line 621 of file insurfeval.cc.

623 {
624 
625  REAL du[4];
626  REAL dv[4];
627 
628 
629  assert(global_ev_k>=3 && global_ev_k <= 4);
630  /*compute homegeneous point and partial derivatives*/
631 // inPreEvaluateBU(global_ev_k, global_ev_uorder, global_ev_vorder, (u-global_ev_u1)/(global_ev_u2-global_ev_u1), global_ev_ctlPoints);
633 
634 
635 #ifdef AVOID_ZERO_NORMAL
636 
637  if(myabs(dv[0]) <= MYZERO && myabs(dv[1]) <= MYZERO && myabs(dv[2]) <= MYZERO)
638  {
639 
640  REAL tempdu[4];
641  REAL tempdata[4];
642  REAL u1 = global_ev_u1;
643  REAL u2 = global_ev_u2;
644  if(u-MYDELTA*(u2-u1) < u1)
645  u = u+ MYDELTA*(u2-u1);
646  else
647  u = u-MYDELTA*(u2-u1);
649  }
650  if(myabs(du[0]) <= MYZERO && myabs(du[1]) <= MYZERO && myabs(du[2]) <= MYZERO)
651  {
652  REAL tempdv[4];
653  REAL tempdata[4];
654  REAL v1 = global_ev_v1;
655  REAL v2 = global_ev_v2;
656  if(v-MYDELTA*(v2-v1) < v1)
657  v = v+ MYDELTA*(v2-v1);
658  else
659  v = v-MYDELTA*(v2-v1);
661  }
662 #endif
663 
664  /*compute normal*/
665  switch(global_ev_k){
666  case 3:
667  inComputeNormal2(du, dv, retNormal);
668  break;
669  case 4:
670  inComputeFirstPartials(retPoint, du, dv);
671  inComputeNormal2(du, dv, retNormal);
672  /*transform the homegeneous coordinate of retPoint into inhomogenous one*/
673  retPoint[0] /= retPoint[3];
674  retPoint[1] /= retPoint[3];
675  retPoint[2] /= retPoint[3];
676  break;
677  }
678 }
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
void inComputeNormal2(REAL *pu, REAL *pv, REAL *n)
Definition: insurfeval.cc:518
GLdouble GLdouble u2
Definition: glext.h:8308
void inComputeFirstPartials(REAL *p, REAL *pu, REAL *pv)
Definition: insurfeval.cc:501
#define assert(x)
Definition: debug.h:53
GLdouble u1
Definition: glext.h:8308
void inDoDomain2WithDerivs(int k, REAL u, REAL v, REAL u1, REAL u2, int uorder, REAL v1, REAL v2, int vorder, REAL *baseData, REAL *retPoint, REAL *retdu, REAL *retdv)
Definition: insurfeval.cc:949
#define MYZERO
Definition: insurfeval.cc:55
GLfloat GLfloat GLfloat v2
Definition: glext.h:6063
void inDoDomain2WithDerivsBU(int k, REAL u, REAL v, REAL u1, REAL u2, int uorder, REAL v1, REAL v2, int vorder, REAL *baseData, REAL *retPoint, REAL *retdu, REAL *retdv)
Definition: insurfeval.cc:868
const GLdouble * v
Definition: gl.h:2040
REAL global_ev_ctlPoints[IN_MAX_BEZIER_ORDER *IN_MAX_BEZIER_ORDER *IN_MAX_DIMENSION]
Definition: glsurfeval.h:262
#define myabs(x)
Definition: insurfeval.cc:54
float REAL
Definition: types.h:41
#define MYDELTA
Definition: insurfeval.cc:56
GLfloat GLfloat v1
Definition: glext.h:6062

Referenced by inEvalVLine().

◆ inDoEvalCoord2NOGE_BV()

void OpenGLSurfaceEvaluator::inDoEvalCoord2NOGE_BV ( REAL  u,
REAL  v,
REAL retPoint,
REAL retNormal 
)
privatevirtual

Implements BasicSurfaceEvaluator.

Definition at line 684 of file insurfeval.cc.

686 {
687 
688  REAL du[4];
689  REAL dv[4];
690 
691 
692  assert(global_ev_k>=3 && global_ev_k <= 4);
693  /*compute homegeneous point and partial derivatives*/
694 // inPreEvaluateBV(global_ev_k, global_ev_uorder, global_ev_vorder, (v-global_ev_v1)/(global_ev_v2-global_ev_v1), global_ev_ctlPoints);
695 
697 
698 
699 #ifdef AVOID_ZERO_NORMAL
700 
701  if(myabs(dv[0]) <= MYZERO && myabs(dv[1]) <= MYZERO && myabs(dv[2]) <= MYZERO)
702  {
703 
704  REAL tempdu[4];
705  REAL tempdata[4];
706  REAL u1 = global_ev_u1;
707  REAL u2 = global_ev_u2;
708  if(u-MYDELTA*(u2-u1) < u1)
709  u = u+ MYDELTA*(u2-u1);
710  else
711  u = u-MYDELTA*(u2-u1);
713  }
714  if(myabs(du[0]) <= MYZERO && myabs(du[1]) <= MYZERO && myabs(du[2]) <= MYZERO)
715  {
716  REAL tempdv[4];
717  REAL tempdata[4];
718  REAL v1 = global_ev_v1;
719  REAL v2 = global_ev_v2;
720  if(v-MYDELTA*(v2-v1) < v1)
721  v = v+ MYDELTA*(v2-v1);
722  else
723  v = v-MYDELTA*(v2-v1);
725  }
726 #endif
727 
728  /*compute normal*/
729  switch(global_ev_k){
730  case 3:
731  inComputeNormal2(du, dv, retNormal);
732  break;
733  case 4:
734  inComputeFirstPartials(retPoint, du, dv);
735  inComputeNormal2(du, dv, retNormal);
736  /*transform the homegeneous coordinate of retPoint into inhomogenous one*/
737  retPoint[0] /= retPoint[3];
738  retPoint[1] /= retPoint[3];
739  retPoint[2] /= retPoint[3];
740  break;
741  }
742 }
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
void inComputeNormal2(REAL *pu, REAL *pv, REAL *n)
Definition: insurfeval.cc:518
GLdouble GLdouble u2
Definition: glext.h:8308
void inComputeFirstPartials(REAL *p, REAL *pu, REAL *pv)
Definition: insurfeval.cc:501
void inDoDomain2WithDerivsBV(int k, REAL u, REAL v, REAL u1, REAL u2, int uorder, REAL v1, REAL v2, int vorder, REAL *baseData, REAL *retPoint, REAL *retdu, REAL *retdv)
Definition: insurfeval.cc:903
#define assert(x)
Definition: debug.h:53
GLdouble u1
Definition: glext.h:8308
void inDoDomain2WithDerivs(int k, REAL u, REAL v, REAL u1, REAL u2, int uorder, REAL v1, REAL v2, int vorder, REAL *baseData, REAL *retPoint, REAL *retdu, REAL *retdv)
Definition: insurfeval.cc:949
#define MYZERO
Definition: insurfeval.cc:55
GLfloat GLfloat GLfloat v2
Definition: glext.h:6063
const GLdouble * v
Definition: gl.h:2040
REAL global_ev_ctlPoints[IN_MAX_BEZIER_ORDER *IN_MAX_BEZIER_ORDER *IN_MAX_DIMENSION]
Definition: glsurfeval.h:262
#define myabs(x)
Definition: insurfeval.cc:54
float REAL
Definition: types.h:41
#define MYDELTA
Definition: insurfeval.cc:56
GLfloat GLfloat v1
Definition: glext.h:6062

Referenced by inEvalULine().

◆ inEvalCoord2f()

void OpenGLSurfaceEvaluator::inEvalCoord2f ( REAL  u,
REAL  v 
)
private

Definition at line 375 of file insurfeval.cc.

376 {
377 
378  REAL point[4];
379  REAL normal[3];
381 }
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
POINTL point
Definition: edittest.c:50
const GLdouble * v
Definition: gl.h:2040
void inDoEvalCoord2(REAL u, REAL v, REAL *retPoint, REAL *retNormal)
Definition: insurfeval.cc:541
float REAL
Definition: types.h:41

Referenced by coord2f(), and inBPMEval().

◆ inEvalMesh2()

void OpenGLSurfaceEvaluator::inEvalMesh2 ( int  lowU,
int  lowV,
int  highU,
int  highV 
)
private

Definition at line 400 of file insurfeval.cc.

401 {
402  REAL du, dv;
403  int i,j;
404  REAL point[4];
405  REAL normal[3];
406  if(global_grid_nu == 0 || global_grid_nv == 0)
407  return; /*no points need to be output*/
410 
412  for(i=lowU; i<highU; i++){
414  REAL u2 = ((i+1) == global_grid_nu)? global_grid_u1: (global_grid_u0+(i+1)*du);
415 
416  bgnqstrip();
417  for(j=highV; j>=lowV; j--){
419 
422  }
423  endqstrip();
424  }
425  }
426 
427  else{
428  for(i=lowV; i<highV; i++){
430  REAL v2 = ((i+1) == global_grid_nv)? global_grid_v1: (global_grid_v0+(i+1)*dv);
431 
432  bgnqstrip();
433  for(j=highU; j>=lowU; j--){
437  }
438  endqstrip();
439  }
440  }
441 
442 }
GLdouble GLdouble u2
Definition: glext.h:8308
GLdouble u1
Definition: glext.h:8308
POINTL point
Definition: edittest.c:50
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
GLfloat GLfloat GLfloat v2
Definition: glext.h:6063
void inDoEvalCoord2(REAL u, REAL v, REAL *retPoint, REAL *retNormal)
Definition: insurfeval.cc:541
float REAL
Definition: types.h:41
GLfloat GLfloat v1
Definition: glext.h:6062

Referenced by mapmesh2f().

◆ inEvalPoint2()

void OpenGLSurfaceEvaluator::inEvalPoint2 ( int  i,
int  j 
)
private

Definition at line 362 of file insurfeval.cc.

363 {
364  REAL du, dv;
365  REAL point[4];
366  REAL normal[3];
367  REAL u,v;
373 }
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
POINTL point
Definition: edittest.c:50
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
const GLdouble * v
Definition: gl.h:2040
void inDoEvalCoord2(REAL u, REAL v, REAL *retPoint, REAL *retNormal)
Definition: insurfeval.cc:541
float REAL
Definition: types.h:41

Referenced by point2i().

◆ inEvalULine()

void OpenGLSurfaceEvaluator::inEvalULine ( int  n_points,
REAL  v,
REAL u_vals,
int  stride,
REAL  ret_points[][3],
REAL  ret_normals[][3] 
)
private

Definition at line 1125 of file insurfeval.cc.

1127 {
1128  int i,k;
1129  REAL temp[4];
1131 
1132  for(i=0,k=0; i<n_points; i++, k += stride)
1133  {
1134  inDoEvalCoord2NOGE_BV(u_vals[k],v,temp, ret_normals[i]);
1135 
1136  ret_points[i][0] = temp[0];
1137  ret_points[i][1] = temp[1];
1138  ret_points[i][2] = temp[2];
1139 
1140  }
1141 
1142 }
void inPreEvaluateBV_intfac(REAL v)
Definition: glsurfeval.h:316
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 stride
Definition: glext.h:5848
void inDoEvalCoord2NOGE_BV(REAL u, REAL v, REAL *retPoint, REAL *retNormal)
Definition: insurfeval.cc:684
const GLdouble * v
Definition: gl.h:2040
static calc_node_t temp
Definition: rpn_ieee.c:38
float REAL
Definition: types.h:41
int k
Definition: mpi.c:3369

Referenced by inEvalUStrip().

◆ inEvalUStrip()

void OpenGLSurfaceEvaluator::inEvalUStrip ( int  n_upper,
REAL  v_upper,
REAL upper_val,
int  n_lower,
REAL  v_lower,
REAL lower_val 
)
private

Definition at line 1166 of file insurfeval.cc.

1167 {
1168  int i,j,k,l;
1169  REAL leftMostV[2];
1170  typedef REAL REAL3[3];
1171 
1172  REAL3* upperXYZ = (REAL3*) malloc(sizeof(REAL3)*n_upper);
1173  assert(upperXYZ);
1174  REAL3* upperNormal = (REAL3*) malloc(sizeof(REAL3) * n_upper);
1175  assert(upperNormal);
1176  REAL3* lowerXYZ = (REAL3*) malloc(sizeof(REAL3)*n_lower);
1177  assert(lowerXYZ);
1178  REAL3* lowerNormal = (REAL3*) malloc(sizeof(REAL3) * n_lower);
1179  assert(lowerNormal);
1180 
1181  inEvalULine(n_upper, v_upper, upper_val, 1, upperXYZ, upperNormal);
1182  inEvalULine(n_lower, v_lower, lower_val, 1, lowerXYZ, lowerNormal);
1183 
1184 
1185 
1186  REAL* leftMostXYZ;
1187  REAL* leftMostNormal;
1188 
1189  /*
1190  *the algorithm works by scanning from left to right.
1191  *leftMostV: the left most of the remaining verteces (on both upper and lower).
1192  * it could an element of upperVerts or lowerVerts.
1193  *i: upperVerts[i] is the first vertex to the right of leftMostV on upper line *j: lowerVerts[j] is the first vertex to the right of leftMostV on lower line */
1194 
1195  /*initialize i,j,and leftMostV
1196  */
1197  if(upper_val[0] <= lower_val[0])
1198  {
1199  i=1;
1200  j=0;
1201 
1202  leftMostV[0] = upper_val[0];
1203  leftMostV[1] = v_upper;
1204  leftMostXYZ = upperXYZ[0];
1205  leftMostNormal = upperNormal[0];
1206  }
1207  else
1208  {
1209  i=0;
1210  j=1;
1211 
1212  leftMostV[0] = lower_val[0];
1213  leftMostV[1] = v_lower;
1214 
1215  leftMostXYZ = lowerXYZ[0];
1216  leftMostNormal = lowerNormal[0];
1217  }
1218 
1219  /*the main loop.
1220  *the invariance is that:
1221  *at the beginning of each loop, the meaning of i,j,and leftMostV are
1222  *maintained
1223  */
1224  while(1)
1225  {
1226  if(i >= n_upper) /*case1: no more in upper*/
1227  {
1228  if(j<n_lower-1) /*at least two vertices in lower*/
1229  {
1230  bgntfan();
1231  glNormal3fv(leftMostNormal);
1232  glVertex3fv(leftMostXYZ);
1233 
1234  while(j<n_lower){
1235  glNormal3fv(lowerNormal[j]);
1236  glVertex3fv(lowerXYZ[j]);
1237  j++;
1238 
1239  }
1240  endtfan();
1241  }
1242  break; /*exit the main loop*/
1243  }
1244  else if(j>= n_lower) /*case2: no more in lower*/
1245  {
1246  if(i<n_upper-1) /*at least two vertices in upper*/
1247  {
1248  bgntfan();
1249  glNormal3fv(leftMostNormal);
1250  glVertex3fv(leftMostXYZ);
1251 
1252  for(k=n_upper-1; k>=i; k--) /*reverse order for two-side lighting*/
1253  {
1254  glNormal3fv(upperNormal[k]);
1255  glVertex3fv(upperXYZ[k]);
1256  }
1257 
1258  endtfan();
1259  }
1260  break; /*exit the main loop*/
1261  }
1262  else /* case3: neither is empty, plus the leftMostV, there is at least one triangle to output*/
1263  {
1264  if(upper_val[i] <= lower_val[j])
1265  {
1266  bgntfan();
1267 
1268  glNormal3fv(lowerNormal[j]);
1269  glVertex3fv(lowerXYZ[j]);
1270 
1271  /*find the last k>=i such that
1272  *upperverts[k][0] <= lowerverts[j][0]
1273  */
1274  k=i;
1275 
1276  while(k<n_upper)
1277  {
1278  if(upper_val[k] > lower_val[j])
1279  break;
1280  k++;
1281 
1282  }
1283  k--;
1284 
1285 
1286  for(l=k; l>=i; l--)/*the reverse is for two-side lighting*/
1287  {
1288  glNormal3fv(upperNormal[l]);
1289  glVertex3fv(upperXYZ[l]);
1290 
1291  }
1292  glNormal3fv(leftMostNormal);
1293  glVertex3fv(leftMostXYZ);
1294 
1295  endtfan();
1296 
1297  /*update i and leftMostV for next loop
1298  */
1299  i = k+1;
1300 
1301  leftMostV[0] = upper_val[k];
1302  leftMostV[1] = v_upper;
1303  leftMostNormal = upperNormal[k];
1304  leftMostXYZ = upperXYZ[k];
1305  }
1306  else /*upperVerts[i][0] > lowerVerts[j][0]*/
1307  {
1308  bgntfan();
1309  glNormal3fv(upperNormal[i]);
1310  glVertex3fv(upperXYZ[i]);
1311 
1312  glNormal3fv(leftMostNormal);
1313  glVertex3fv(leftMostXYZ);
1314 
1315 
1316  /*find the last k>=j such that
1317  *lowerverts[k][0] < upperverts[i][0]
1318  */
1319  k=j;
1320  while(k< n_lower)
1321  {
1322  if(lower_val[k] >= upper_val[i])
1323  break;
1324  glNormal3fv(lowerNormal[k]);
1325  glVertex3fv(lowerXYZ[k]);
1326 
1327  k++;
1328  }
1329  endtfan();
1330 
1331  /*update j and leftMostV for next loop
1332  */
1333  j=k;
1334  leftMostV[0] = lower_val[j-1];
1335  leftMostV[1] = v_lower;
1336 
1337  leftMostNormal = lowerNormal[j-1];
1338  leftMostXYZ = lowerXYZ[j-1];
1339  }
1340  }
1341  }
1342  //clean up
1343  free(upperXYZ);
1344  free(lowerXYZ);
1345  free(upperNormal);
1346  free(lowerNormal);
1347 }
GLAPI void GLAPIENTRY glNormal3fv(const GLfloat *v)
#define free
Definition: debug_ros.c:5
#define assert(x)
Definition: debug.h:53
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
void inEvalULine(int n_points, REAL v, REAL *u_vals, int stride, REAL ret_points[][3], REAL ret_normals[][3])
Definition: insurfeval.cc:1125
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
r l[0]
Definition: byte_order.h:167
GLAPI void GLAPIENTRY glVertex3fv(const GLfloat *v)
#define malloc
Definition: debug_ros.c:4
float REAL
Definition: types.h:41
int k
Definition: mpi.c:3369

Referenced by evalUStrip().

◆ inEvalVLine()

void OpenGLSurfaceEvaluator::inEvalVLine ( int  n_points,
REAL  u,
REAL v_vals,
int  stride,
REAL  ret_points[][3],
REAL  ret_normals[][3] 
)
private

Definition at line 1144 of file insurfeval.cc.

1146 {
1147  int i,k;
1148  REAL temp[4];
1150  for(i=0,k=0; i<n_points; i++, k += stride)
1151  {
1152  inDoEvalCoord2NOGE_BU(u, v_vals[k], temp, ret_normals[i]);
1153  ret_points[i][0] = temp[0];
1154  ret_points[i][1] = temp[1];
1155  ret_points[i][2] = temp[2];
1156  }
1157 }
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
void inPreEvaluateBU_intfac(REAL u)
Definition: glsurfeval.h:321
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 stride
Definition: glext.h:5848
void inDoEvalCoord2NOGE_BU(REAL u, REAL v, REAL *retPoint, REAL *retNormal)
Definition: insurfeval.cc:621
static calc_node_t temp
Definition: rpn_ieee.c:38
float REAL
Definition: types.h:41
int k
Definition: mpi.c:3369

Referenced by inEvalVStrip().

◆ inEvalVStrip()

void OpenGLSurfaceEvaluator::inEvalVStrip ( int  n_left,
REAL  u_left,
REAL left_val,
int  n_right,
REAL  u_right,
REAL right_val 
)
private

Definition at line 1355 of file insurfeval.cc.

1356 {
1357  int i,j,k,l;
1358  REAL botMostV[2];
1359  typedef REAL REAL3[3];
1360 
1361  REAL3* leftXYZ = (REAL3*) malloc(sizeof(REAL3)*n_left);
1362  assert(leftXYZ);
1363  REAL3* leftNormal = (REAL3*) malloc(sizeof(REAL3) * n_left);
1364  assert(leftNormal);
1365  REAL3* rightXYZ = (REAL3*) malloc(sizeof(REAL3)*n_right);
1366  assert(rightXYZ);
1367  REAL3* rightNormal = (REAL3*) malloc(sizeof(REAL3) * n_right);
1368  assert(rightNormal);
1369 
1370  inEvalVLine(n_left, u_left, left_val, 1, leftXYZ, leftNormal);
1371  inEvalVLine(n_right, u_right, right_val, 1, rightXYZ, rightNormal);
1372 
1373 
1374 
1375  REAL* botMostXYZ;
1376  REAL* botMostNormal;
1377 
1378  /*
1379  *the algorithm works by scanning from bot to top.
1380  *botMostV: the bot most of the remaining verteces (on both left and right).
1381  * it could an element of leftVerts or rightVerts.
1382  *i: leftVerts[i] is the first vertex to the top of botMostV on left line
1383  *j: rightVerts[j] is the first vertex to the top of botMostV on rightline */
1384 
1385  /*initialize i,j,and botMostV
1386  */
1387  if(left_val[0] <= right_val[0])
1388  {
1389  i=1;
1390  j=0;
1391 
1392  botMostV[0] = u_left;
1393  botMostV[1] = left_val[0];
1394  botMostXYZ = leftXYZ[0];
1395  botMostNormal = leftNormal[0];
1396  }
1397  else
1398  {
1399  i=0;
1400  j=1;
1401 
1402  botMostV[0] = u_right;
1403  botMostV[1] = right_val[0];
1404 
1405  botMostXYZ = rightXYZ[0];
1406  botMostNormal = rightNormal[0];
1407  }
1408 
1409  /*the main loop.
1410  *the invariance is that:
1411  *at the beginning of each loop, the meaning of i,j,and botMostV are
1412  *maintained
1413  */
1414  while(1)
1415  {
1416  if(i >= n_left) /*case1: no more in left*/
1417  {
1418  if(j<n_right-1) /*at least two vertices in right*/
1419  {
1420  bgntfan();
1421  glNormal3fv(botMostNormal);
1422  glVertex3fv(botMostXYZ);
1423 
1424  while(j<n_right){
1425  glNormal3fv(rightNormal[j]);
1426  glVertex3fv(rightXYZ[j]);
1427  j++;
1428 
1429  }
1430  endtfan();
1431  }
1432  break; /*exit the main loop*/
1433  }
1434  else if(j>= n_right) /*case2: no more in right*/
1435  {
1436  if(i<n_left-1) /*at least two vertices in left*/
1437  {
1438  bgntfan();
1439  glNormal3fv(botMostNormal);
1440  glVertex3fv(botMostXYZ);
1441 
1442  for(k=n_left-1; k>=i; k--) /*reverse order for two-side lighting*/
1443  {
1444  glNormal3fv(leftNormal[k]);
1445  glVertex3fv(leftXYZ[k]);
1446  }
1447 
1448  endtfan();
1449  }
1450  break; /*exit the main loop*/
1451  }
1452  else /* case3: neither is empty, plus the botMostV, there is at least one triangle to output*/
1453  {
1454  if(left_val[i] <= right_val[j])
1455  {
1456  bgntfan();
1457 
1458  glNormal3fv(rightNormal[j]);
1459  glVertex3fv(rightXYZ[j]);
1460 
1461  /*find the last k>=i such that
1462  *leftverts[k][0] <= rightverts[j][0]
1463  */
1464  k=i;
1465 
1466  while(k<n_left)
1467  {
1468  if(left_val[k] > right_val[j])
1469  break;
1470  k++;
1471 
1472  }
1473  k--;
1474 
1475 
1476  for(l=k; l>=i; l--)/*the reverse is for two-side lighting*/
1477  {
1478  glNormal3fv(leftNormal[l]);
1479  glVertex3fv(leftXYZ[l]);
1480 
1481  }
1482  glNormal3fv(botMostNormal);
1483  glVertex3fv(botMostXYZ);
1484 
1485  endtfan();
1486 
1487  /*update i and botMostV for next loop
1488  */
1489  i = k+1;
1490 
1491  botMostV[0] = u_left;
1492  botMostV[1] = left_val[k];
1493  botMostNormal = leftNormal[k];
1494  botMostXYZ = leftXYZ[k];
1495  }
1496  else /*left_val[i] > right_val[j])*/
1497  {
1498  bgntfan();
1499  glNormal3fv(leftNormal[i]);
1500  glVertex3fv(leftXYZ[i]);
1501 
1502  glNormal3fv(botMostNormal);
1503  glVertex3fv(botMostXYZ);
1504 
1505 
1506  /*find the last k>=j such that
1507  *rightverts[k][0] < leftverts[i][0]
1508  */
1509  k=j;
1510  while(k< n_right)
1511  {
1512  if(right_val[k] >= left_val[i])
1513  break;
1514  glNormal3fv(rightNormal[k]);
1515  glVertex3fv(rightXYZ[k]);
1516 
1517  k++;
1518  }
1519  endtfan();
1520 
1521  /*update j and botMostV for next loop
1522  */
1523  j=k;
1524  botMostV[0] = u_right;
1525  botMostV[1] = right_val[j-1];
1526 
1527  botMostNormal = rightNormal[j-1];
1528  botMostXYZ = rightXYZ[j-1];
1529  }
1530  }
1531  }
1532  //clean up
1533  free(leftXYZ);
1534  free(rightXYZ);
1535  free(leftNormal);
1536  free(rightNormal);
1537 }
GLAPI void GLAPIENTRY glNormal3fv(const GLfloat *v)
#define free
Definition: debug_ros.c:5
#define assert(x)
Definition: debug.h:53
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
r l[0]
Definition: byte_order.h:167
void inEvalVLine(int n_points, REAL u, REAL *v_vals, int stride, REAL ret_points[][3], REAL ret_normals[][3])
Definition: insurfeval.cc:1144
GLAPI void GLAPIENTRY glVertex3fv(const GLfloat *v)
#define malloc
Definition: debug_ros.c:4
float REAL
Definition: types.h:41
int k
Definition: mpi.c:3369

Referenced by evalVStrip().

◆ inMap2f()

void OpenGLSurfaceEvaluator::inMap2f ( int  k,
REAL  ulower,
REAL  uupper,
int  ustride,
int  uorder,
REAL  vlower,
REAL  vupper,
int  vstride,
int  vorder,
REAL ctlPoints 
)
private

Definition at line 444 of file insurfeval.cc.

454 {
455  int i,j,x;
457 
458 
459 
460  if(k == GL_MAP2_VERTEX_3) k=3;
461  else if (k==GL_MAP2_VERTEX_4) k =4;
462  else {
463  printf("error in inMap2f, maptype=%i is wrong, k,map is not updated\n", k);
464  return;
465  }
466 
467  global_ev_k = k;
468  global_ev_u1 = ulower;
469  global_ev_u2 = uupper;
472  global_ev_v1 = vlower;
473  global_ev_v2 = vupper;
476 
477  /*copy the contrl points from ctlPoints to global_ev_ctlPoints*/
478  for (i=0; i<uorder; i++) {
479  for (j=0; j<vorder; j++) {
480  for (x=0; x<k; x++) {
481  data[x] = ctlPoints[x];
482  }
483  ctlPoints += vstride;
484  data += k;
485  }
486  ctlPoints += ustride - vstride * vorder;
487  }
488 
489 }
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint vstride
Definition: glext.h:8308
GLdouble GLdouble GLint ustride
Definition: glext.h:8308
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint vorder
Definition: glext.h:8308
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 GL_MAP2_VERTEX_4
Definition: gl.h:568
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
GLdouble GLdouble GLint GLint uorder
Definition: glext.h:8308
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define GL_MAP2_VERTEX_3
Definition: gl.h:567
REAL global_ev_ctlPoints[IN_MAX_BEZIER_ORDER *IN_MAX_BEZIER_ORDER *IN_MAX_DIMENSION]
Definition: glsurfeval.h:262
float REAL
Definition: types.h:41
int k
Definition: mpi.c:3369
#define printf
Definition: config.h:203

Referenced by inBPMEval(), and map2f().

◆ inMap2fEM()

void OpenGLSurfaceEvaluator::inMap2fEM ( int  which,
int  dimension,
REAL  ulower,
REAL  uupper,
int  ustride,
int  uorder,
REAL  vlower,
REAL  vupper,
int  vstride,
int  vorder,
REAL ctlPoints 
)
private

Definition at line 1540 of file insurfeval.cc.

1550 {
1551  int i,j,x;
1552  surfEvalMachine *temp_em;
1553  switch(which){
1554  case 0: //vertex
1555  vertex_flag = 1;
1556  temp_em = &em_vertex;
1557  break;
1558  case 1: //normal
1559  normal_flag = 1;
1560  temp_em = &em_normal;
1561  break;
1562  case 2: //color
1563  color_flag = 1;
1564  temp_em = &em_color;
1565  break;
1566  default:
1567  texcoord_flag = 1;
1568  temp_em = &em_texcoord;
1569  break;
1570  }
1571 
1572  REAL *data = temp_em->ctlPoints;
1573 
1574  temp_em->uprime = -1;//initilized
1575  temp_em->vprime = -1;
1576 
1577  temp_em->k = k;
1578  temp_em->u1 = ulower;
1579  temp_em->u2 = uupper;
1580  temp_em->ustride = ustride;
1581  temp_em->uorder = uorder;
1582  temp_em->v1 = vlower;
1583  temp_em->v2 = vupper;
1584  temp_em->vstride = vstride;
1585  temp_em->vorder = vorder;
1586 
1587  /*copy the contrl points from ctlPoints to global_ev_ctlPoints*/
1588  for (i=0; i<uorder; i++) {
1589  for (j=0; j<vorder; j++) {
1590  for (x=0; x<k; x++) {
1591  data[x] = ctlPoints[x];
1592  }
1593  ctlPoints += vstride;
1594  data += k;
1595  }
1596  ctlPoints += ustride - vstride * vorder;
1597  }
1598 }
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint vstride
Definition: glext.h:8308
GLdouble GLdouble GLint ustride
Definition: glext.h:8308
REAL ctlPoints[IN_MAX_BEZIER_ORDER *IN_MAX_BEZIER_ORDER *IN_MAX_DIMENSION]
Definition: glsurfeval.h:75
surfEvalMachine em_vertex
Definition: glsurfeval.h:349
surfEvalMachine em_color
Definition: glsurfeval.h:351
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint vorder
Definition: glext.h:8308
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
GLdouble GLdouble GLint GLint uorder
Definition: glext.h:8308
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
surfEvalMachine em_texcoord
Definition: glsurfeval.h:352
surfEvalMachine em_normal
Definition: glsurfeval.h:350
float REAL
Definition: types.h:41
int k
Definition: mpi.c:3369