ReactOS  0.4.11-dev-465-g0e6bc23
Backend Class Reference

#include <backend.h>

Collaboration diagram for Backend:

Public Member Functions

 Backend (BasicCurveEvaluator &c, BasicSurfaceEvaluator &e)
 
void bgnsurf (int, int, long)
 
void patch (REAL, REAL, REAL, REAL)
 
void surfpts (long, REAL *, long, long, int, int, REAL, REAL, REAL, REAL)
 
void surfbbox (long, REAL *, REAL *)
 
void surfgrid (REAL, REAL, long, REAL, REAL, long)
 
void surfmesh (long, long, long, long)
 
void bgntmesh (const char *)
 
void endtmesh (void)
 
void swaptmesh (void)
 
void tmeshvert (GridTrimVertex *)
 
void tmeshvert (TrimVertex *)
 
void tmeshvert (GridVertex *)
 
void tmeshvert (REAL u, REAL v)
 
void linevert (TrimVertex *)
 
void linevert (GridVertex *)
 
void bgnoutline (void)
 
void endoutline (void)
 
void endsurf (void)
 
void triangle (TrimVertex *, TrimVertex *, TrimVertex *)
 
void bgntfan ()
 
void endtfan ()
 
void bgnqstrip ()
 
void endqstrip ()
 
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 v_right, REAL *right_val)
 
void tmeshvertNOGE (TrimVertex *t)
 
void tmeshvertNOGE_BU (TrimVertex *t)
 
void tmeshvertNOGE_BV (TrimVertex *t)
 
void preEvaluateBU (REAL u)
 
void preEvaluateBV (REAL v)
 
void bgncurv (void)
 
void segment (REAL, REAL)
 
void curvpts (long, REAL *, long, int, REAL, REAL)
 
void curvgrid (REAL, REAL, long)
 
void curvmesh (long, long)
 
void curvpt (REAL)
 
void bgnline (void)
 
void endline (void)
 
void endcurv (void)
 

Private Attributes

BasicCurveEvaluatorcurveEvaluator
 
BasicSurfaceEvaluatorsurfaceEvaluator
 
int wireframetris
 
int wireframequads
 
int npts
 
REAL mesh [3][4]
 
int meshindex
 

Detailed Description

Definition at line 46 of file backend.h.

Constructor & Destructor Documentation

Backend::Backend ( BasicCurveEvaluator c,
BasicSurfaceEvaluator e 
)
inline

Definition at line 51 of file backend.h.

BasicCurveEvaluator & curveEvaluator
Definition: backend.h:48
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49

Member Function Documentation

void Backend::bgncurv ( void  )

Definition at line 529 of file backend.cc.

Referenced by Subdivider::drawCurves().

530 {
532 }
BasicCurveEvaluator & curveEvaluator
Definition: backend.h:48
virtual void bgnmap1f(long)
Definition: basiccrveval.cc:77
void Backend::bgnline ( void  )

Definition at line 573 of file backend.cc.

574 {
576 }
BasicCurveEvaluator & curveEvaluator
Definition: backend.h:48
virtual void bgnline(void)
void Backend::bgnoutline ( void  )

Definition at line 477 of file backend.cc.

Referenced by Slicer::outline().

478 {
480 }
virtual void bgnline(void)
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
void Backend::bgnqstrip ( void  )

Definition at line 203 of file backend.cc.

Referenced by triangulateRectAux().

204 {
206 /*
207  if(wireframequads)
208  surfaceEvaluator.polymode( N_MESHLINE );
209  else
210  surfaceEvaluator.polymode( N_MESHFILL );
211 */
212 }
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
virtual void bgnqstrip(void)
void Backend::bgnsurf ( int  wiretris,
int  wirequads,
long  nuid 
)

Definition at line 58 of file backend.cc.

Referenced by Subdivider::drawSurfaces().

59 {
60 /*#ifndef NOWIREFRAME*/ //need this for old version
61  wireframetris = wiretris;
62  wireframequads = wirequads;
63 /*#endif*/
64 
65  /*in the spec, GLU_DISPLAY_MODE is either
66  * GLU_FILL
67  * GLU_OUTLINE_POLY
68  * GLU_OUTLINE_PATCH.
69  *In fact, GLU_FLL is has the same effect as
70  * set GL_FRONT_AND_BACK to be GL_FILL
71  * and GLU_OUTLINE_POLY is the same as set
72  * GL_FRONT_AND_BACK to be GL_LINE
73  *It is more efficient to do this once at the beginning of
74  *each surface than to do it for each primitive.
75  * The internal has more options: outline_triangle and outline_quad
76  *can be seperated. But since this is not in spec, and more importantly,
77  *this is not so useful, so we don't need to keep this option.
78  */
79 
80  surfaceEvaluator.bgnmap2f( nuid );
81 
82  if(wiretris)
84  else
86 }
virtual void bgnmap2f(long)
int wireframetris
Definition: backend.h:105
int wireframequads
Definition: backend.h:106
#define N_MESHLINE
Definition: displaymode.h:37
#define N_MESHFILL
Definition: displaymode.h:36
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
virtual void polymode(long)
void Backend::bgntfan ( void  )

Definition at line 185 of file backend.cc.

Referenced by Slicer::evalStream(), reflexChain::outputFan(), reflexChain::processNewVertex(), triangle(), and triangulateRectAux().

186 {
188 /*
189  if(wireframetris)
190  surfaceEvaluator.polymode( N_MESHLINE );
191  else
192  surfaceEvaluator.polymode( N_MESHFILL );
193 */
194 }
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
virtual void bgntfan(void)
void Backend::bgntmesh ( const char )

Definition at line 246 of file backend.cc.

Referenced by CoveAndTiler::coveAndTile(), CoveAndTiler::coveLowerLeft(), CoveAndTiler::coveLowerLeftNoGrid(), CoveAndTiler::coveLowerRight(), CoveAndTiler::coveLowerRightNoGrid(), CoveAndTiler::coveUpperLeft(), CoveAndTiler::coveUpperLeftNoGrid(), CoveAndTiler::coveUpperRight(), CoveAndTiler::coveUpperRightNoGrid(), and Mesher::openMesh().

247 {
248 #ifndef NOWIREFRAME
249 
250  meshindex = 0; /* I think these need to be initialized to zero */
251  npts = 0;
252 
253  if( !wireframetris ) {
255  }
256 #else
257 
258  if( wireframetris ) {
261  } else {
264  }
265 #endif
266 }
virtual void bgntmesh(void)
int wireframetris
Definition: backend.h:105
int npts
Definition: backend.h:107
int meshindex
Definition: backend.h:109
#define N_MESHLINE
Definition: displaymode.h:37
#define N_MESHFILL
Definition: displaymode.h:36
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
virtual void polymode(long)
void Backend::curvgrid ( REAL  u0,
REAL  u1,
long  nu 
)

Definition at line 555 of file backend.cc.

Referenced by Subdivider::samplingSplit().

556 {
557  curveEvaluator.mapgrid1f( nu, u0, u1 );
558 }
BasicCurveEvaluator & curveEvaluator
Definition: backend.h:48
GLdouble u1
Definition: glext.h:8308
virtual void mapgrid1f(long, REAL, REAL)
Definition: basiccrveval.cc:93
void Backend::curvmesh ( long  from,
long  n 
)

Definition at line 561 of file backend.cc.

Referenced by Subdivider::samplingSplit().

562 {
564 }
BasicCurveEvaluator & curveEvaluator
Definition: backend.h:48
GLuint n
Definition: s_context.h:57
#define N_MESHFILL
Definition: displaymode.h:36
virtual void mapmesh1f(long, long, long)
CardRegion * from
Definition: spigame.cpp:19
void Backend::curvpt ( REAL  u)

Definition at line 567 of file backend.cc.

568 {
570 }
BasicCurveEvaluator & curveEvaluator
Definition: backend.h:48
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint 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 GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble * u
Definition: glfuncs.h:88
virtual void evalcoord1f(long, REAL)
void Backend::curvpts ( long  type,
REAL pts,
long  stride,
int  order,
REAL  ulo,
REAL  uhi 
)

Definition at line 541 of file backend.cc.

Referenced by Quilt::download().

549 {
550  curveEvaluator.map1f( type, ulo, uhi, stride, order, pts );
552 }
virtual void enable(long)
Definition: basiccrveval.cc:61
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
BasicCurveEvaluator & curveEvaluator
Definition: backend.h:48
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLsizei stride
Definition: glext.h:5848
virtual void map1f(long, REAL, REAL, long, long, REAL *)
Definition: basiccrveval.cc:85
void Backend::endcurv ( void  )

Definition at line 585 of file backend.cc.

Referenced by Subdivider::drawCurves().

586 {
588 }
BasicCurveEvaluator & curveEvaluator
Definition: backend.h:48
virtual void endmap1f(void)
void Backend::endline ( void  )

Definition at line 579 of file backend.cc.

580 {
582 }
BasicCurveEvaluator & curveEvaluator
Definition: backend.h:48
virtual void endline(void)
void Backend::endoutline ( void  )

Definition at line 507 of file backend.cc.

Referenced by Slicer::outline().

508 {
510 }
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
virtual void endline(void)
void Backend::endqstrip ( void  )

Definition at line 215 of file backend.cc.

Referenced by triangulateRectAux().

216 {
218 }
virtual void endqstrip(void)
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
void Backend::endsurf ( void  )

Definition at line 178 of file backend.cc.

Referenced by Subdivider::drawSurfaces().

179 {
181 }
virtual void endmap2f(void)
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
void Backend::endtfan ( void  )

Definition at line 197 of file backend.cc.

Referenced by Slicer::evalStream(), reflexChain::outputFan(), reflexChain::processNewVertex(), triangle(), and triangulateRectAux().

198 {
200 }
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
virtual void endtfan(void)
void Backend::endtmesh ( void  )

Definition at line 460 of file backend.cc.

Referenced by Mesher::closeMesh(), CoveAndTiler::coveAndTile(), CoveAndTiler::coveLowerLeft(), CoveAndTiler::coveLowerLeftNoGrid(), CoveAndTiler::coveLowerRight(), CoveAndTiler::coveLowerRightNoGrid(), CoveAndTiler::coveUpperLeft(), CoveAndTiler::coveUpperLeftNoGrid(), CoveAndTiler::coveUpperRight(), and CoveAndTiler::coveUpperRightNoGrid().

461 {
462 #ifndef NOWIREFRAME
463  if( ! wireframetris )
465 #else
467 /* surfaceEvaluator.polymode( N_MESHFILL );*/
468 #endif
469 }
int wireframetris
Definition: backend.h:105
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
virtual void endtmesh(void)
void Backend::evalUStrip ( int  n_upper,
REAL  v_upper,
REAL upper_val,
int  n_lower,
REAL  v_lower,
REAL lower_val 
)

Definition at line 221 of file backend.cc.

Referenced by triangulateRectTopGen().

224 {
225  surfaceEvaluator.evalUStrip(n_upper, v_upper, upper_val,
226  n_lower, v_lower, lower_val);
227 }
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
virtual void evalUStrip(int n_upper, REAL v_upper, REAL *upper_val, int n_lower, REAL v_lower, REAL *lower_val)=0
void Backend::evalVStrip ( int  n_left,
REAL  u_left,
REAL left_val,
int  n_right,
REAL  v_right,
REAL right_val 
)

Definition at line 230 of file backend.cc.

Referenced by triangulateRectTopGen().

233 {
234  surfaceEvaluator.evalVStrip(n_left, u_left, left_val,
235  n_right, u_right, right_val);
236 }
virtual void evalVStrip(int n_left, REAL u_left, REAL *left_val, int n_right, REAL u_right, REAL *right_val)=0
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
void Backend::linevert ( TrimVertex t)

Definition at line 487 of file backend.cc.

Referenced by Slicer::outline().

488 {
489  surfaceEvaluator.evalcoord2f( t->nuid, t->param[0], t->param[1] );
490 }
virtual void evalcoord2f(long, REAL, REAL)
long nuid
Definition: trimvertex.h:50
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
REAL param[2]
Definition: trimvertex.h:45
void Backend::linevert ( GridVertex g)

Definition at line 497 of file backend.cc.

498 {
499  surfaceEvaluator.evalpoint2i( g->gparam[0], g->gparam[1] );
500 }
long gparam[2]
Definition: gridvertex.h:40
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
virtual void evalpoint2i(long, long)
void Backend::patch ( REAL  ulo,
REAL  uhi,
REAL  vlo,
REAL  vhi 
)

Definition at line 89 of file backend.cc.

Referenced by Subdivider::nonSamplingSplit().

90 {
91  surfaceEvaluator.domain2f( ulo, uhi, vlo, vhi );
92 }
virtual void domain2f(REAL, REAL, REAL, REAL)
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
void Backend::preEvaluateBU ( REAL  u)

Definition at line 306 of file backend.cc.

307 {
309 }
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint 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 GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble * u
Definition: glfuncs.h:88
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
virtual void inPreEvaluateBU_intfac(REAL u)=0
void Backend::preEvaluateBV ( REAL  v)

Definition at line 312 of file backend.cc.

313 {
315 }
virtual void inPreEvaluateBV_intfac(REAL v)=0
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
const GLdouble * v
Definition: gl.h:2040
void Backend::segment ( REAL  ulo,
REAL  uhi 
)

Definition at line 535 of file backend.cc.

536 {
537  curveEvaluator.domain1f( ulo, uhi );
538 }
BasicCurveEvaluator & curveEvaluator
Definition: backend.h:48
virtual void domain1f(REAL, REAL)
Definition: basiccrveval.cc:45
void Backend::surfbbox ( long  type,
REAL from,
REAL to 
)

Definition at line 95 of file backend.cc.

Referenced by Mapdesc::surfbbox().

96 {
98 }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
virtual void range2f(long, REAL *, REAL *)
CardRegion * from
Definition: spigame.cpp:19
void Backend::surfgrid ( REAL  u0,
REAL  u1,
long  nu,
REAL  v0,
REAL  v1,
long  nv 
)

Definition at line 126 of file backend.cc.

Referenced by Subdivider::drawSurfaces(), Slicer::evalRBArray(), Slicer::slice_old(), and triangulateRectCenter().

127 {
128  surfaceEvaluator.mapgrid2f( nu, u0, u1, nv, v0, v1 );
129 }
virtual void mapgrid2f(long, REAL, REAL, long, REAL, REAL)
GLfloat v0
Definition: glext.h:6061
GLdouble u1
Definition: glext.h:8308
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
GLfloat GLfloat v1
Definition: glext.h:6062
void Backend::surfmesh ( long  u,
long  v,
long  n,
long  m 
)

Definition at line 136 of file backend.cc.

Referenced by Subdivider::drawSurfaces(), Slicer::evalRBArray(), CoveAndTiler::tile(), and triangulateRectCenter().

137 {
138 #ifndef NOWIREFRAME
139  if( wireframequads ) {
140  long v0, v1;
141  long u0f = u, u1f = u+n;
142  long v0f = v, v1f = v+m;
143  long parity = (u & 1);
144 
145  for( v0 = v0f, v1 = v0f++ ; v0<v1f; v0 = v1, v1++ ) {
147  for( long u = u0f; u<=u1f; u++ ) {
148  if( parity ) {
151  } else {
154  }
155  parity = 1 - parity;
156  }
158  }
159  } else {
161  }
162 #else
163  if( wireframequads ) {
164 
166  } else {
167 
169  }
170 #endif
171 }
GLfloat v0
Definition: glext.h:6061
virtual void bgnline(void)
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint 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 GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble * u
Definition: glfuncs.h:88
int wireframequads
Definition: backend.h:106
#define N_MESHLINE
Definition: displaymode.h:37
GLuint n
Definition: s_context.h:57
#define N_MESHFILL
Definition: displaymode.h:36
virtual void mapmesh2f(long, long, long, long, long)
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
const GLdouble * v
Definition: gl.h:2040
CONST GLfloat m[16]
Definition: m_xform.h:144
virtual void endline(void)
GLfloat GLfloat v1
Definition: glext.h:6062
virtual void evalpoint2i(long, long)
void Backend::surfpts ( long  type,
REAL pts,
long  ustride,
long  vstride,
int  uorder,
int  vorder,
REAL  ulo,
REAL  uhi,
REAL  vlo,
REAL  vhi 
)

Definition at line 105 of file backend.cc.

Referenced by Quilt::download().

116 {
117  surfaceEvaluator.map2f( type,ulo,uhi,ustride,uorder,vlo,vhi,vstride,vorder,pts );
119 }
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint vstride
Definition: glext.h:8308
GLdouble GLdouble GLint ustride
Definition: glext.h:8308
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint vorder
Definition: glext.h:8308
GLdouble GLdouble GLint GLint uorder
Definition: glext.h:8308
virtual void enable(long)
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
virtual void map2f(long, REAL, REAL, long, long, REAL, REAL, long, long, REAL *)
void Backend::tmeshvert ( GridTrimVertex v)

Definition at line 269 of file backend.cc.

Referenced by Slicer::evalStream(), OPT_OUTVERT(), CoveAndTiler::output(), Mesher::output(), reflexChain::outputFan(), reflexChain::processNewVertex(), and triangle().

270 {
271  if( v->isGridVert() ) {
272  tmeshvert( v->g );
273  } else {
274  tmeshvert( v->t );
275  }
276 }
TrimVertex * t
void tmeshvert(GridTrimVertex *)
Definition: backend.cc:269
GridVertex * g
void Backend::tmeshvert ( TrimVertex t)

Definition at line 323 of file backend.cc.

324 {
325 
326 #ifndef NOWIREFRAME
327  const long nuid = t->nuid;
328 #endif
329  const REAL u = t->param[0];
330  const REAL v = t->param[1];
331 
332 #ifndef NOWIREFRAME
333  npts++;
334  if( wireframetris ) {
335  if( npts >= 3 ) {
337  if( mesh[0][2] == 0 )
338  surfaceEvaluator.evalcoord2f( mesh[0][3], mesh[0][0], mesh[0][1] );
339  else
340  surfaceEvaluator.evalpoint2i( (long) mesh[0][0], (long) mesh[0][1] );
341  if( mesh[1][2] == 0 )
342  surfaceEvaluator.evalcoord2f( mesh[1][3], mesh[1][0], mesh[1][1] );
343  else
344  surfaceEvaluator.evalpoint2i( (long) mesh[1][0], (long) mesh[1][1] );
345  surfaceEvaluator.evalcoord2f( nuid, u, v );
347  }
348  mesh[meshindex][0] = u;
349  mesh[meshindex][1] = v;
350  mesh[meshindex][2] = 0;
351  mesh[meshindex][3] = nuid;
352  meshindex = (meshindex+1) % 2;
353  } else {
354  surfaceEvaluator.evalcoord2f( nuid, u, v );
355  }
356 #else
357 
358  surfaceEvaluator.evalcoord2f( 0, u, v );
359 //for uninitial memory read surfaceEvaluator.evalcoord2f( nuid, u, v );
360 #endif
361 }
int wireframetris
Definition: backend.h:105
int npts
Definition: backend.h:107
virtual void evalcoord2f(long, REAL, REAL)
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint 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 GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble * u
Definition: glfuncs.h:88
int meshindex
Definition: backend.h:109
virtual void endclosedline(void)
long nuid
Definition: trimvertex.h:50
REAL mesh[3][4]
Definition: backend.h:108
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
const GLdouble * v
Definition: gl.h:2040
virtual void bgnclosedline(void)
REAL param[2]
Definition: trimvertex.h:45
float REAL
Definition: types.h:41
virtual void evalpoint2i(long, long)
void Backend::tmeshvert ( GridVertex g)

Definition at line 404 of file backend.cc.

405 {
406  const long u = g->gparam[0];
407  const long v = g->gparam[1];
408 
409 #ifndef NOWIREFRAME
410  npts++;
411  if( wireframetris ) {
412  if( npts >= 3 ) {
414  if( mesh[0][2] == 0 )
415  surfaceEvaluator.evalcoord2f( (long) mesh[0][3], mesh[0][0], mesh[0][1] );
416  else
417  surfaceEvaluator.evalpoint2i( (long) mesh[0][0], (long) mesh[0][1] );
418  if( mesh[1][2] == 0 )
419  surfaceEvaluator.evalcoord2f( (long) mesh[1][3], mesh[1][0], mesh[1][1] );
420  else
421  surfaceEvaluator.evalpoint2i( (long) mesh[1][0], (long) mesh[1][1] );
424  }
425  mesh[meshindex][0] = u;
426  mesh[meshindex][1] = v;
427  mesh[meshindex][2] = 1;
428  meshindex = (meshindex+1) % 2;
429  } else {
431  }
432 #else
434 #endif
435 }
int wireframetris
Definition: backend.h:105
int npts
Definition: backend.h:107
virtual void evalcoord2f(long, REAL, REAL)
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint 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 GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble * u
Definition: glfuncs.h:88
int meshindex
Definition: backend.h:109
long gparam[2]
Definition: gridvertex.h:40
virtual void endclosedline(void)
REAL mesh[3][4]
Definition: backend.h:108
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
const GLdouble * v
Definition: gl.h:2040
virtual void bgnclosedline(void)
virtual void evalpoint2i(long, long)
void Backend::tmeshvert ( REAL  u,
REAL  v 
)

Definition at line 365 of file backend.cc.

366 {
367 #ifndef NOWIREFRAME
368  const long nuid = 0;
369 
370  npts++;
371  if( wireframetris ) {
372  if( npts >= 3 ) {
374  if( mesh[0][2] == 0 )
375  surfaceEvaluator.evalcoord2f( mesh[0][3], mesh[0][0], mesh[0][1] );
376  else
377  surfaceEvaluator.evalpoint2i( (long) mesh[0][0], (long) mesh[0][1] );
378  if( mesh[1][2] == 0 )
379  surfaceEvaluator.evalcoord2f( mesh[1][3], mesh[1][0], mesh[1][1] );
380  else
381  surfaceEvaluator.evalpoint2i( (long) mesh[1][0], (long) mesh[1][1] );
382  surfaceEvaluator.evalcoord2f( nuid, u, v );
384  }
385  mesh[meshindex][0] = u;
386  mesh[meshindex][1] = v;
387  mesh[meshindex][2] = 0;
388  mesh[meshindex][3] = nuid;
389  meshindex = (meshindex+1) % 2;
390  } else {
391  surfaceEvaluator.evalcoord2f( nuid, u, v );
392  }
393 #else
394 
396 #endif
397 }
int wireframetris
Definition: backend.h:105
int npts
Definition: backend.h:107
virtual void evalcoord2f(long, REAL, REAL)
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint 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 GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble * u
Definition: glfuncs.h:88
int meshindex
Definition: backend.h:109
virtual void endclosedline(void)
REAL mesh[3][4]
Definition: backend.h:108
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
const GLdouble * v
Definition: gl.h:2040
virtual void bgnclosedline(void)
virtual void evalpoint2i(long, long)
void Backend::tmeshvertNOGE ( TrimVertex t)

Definition at line 279 of file backend.cc.

280 {
281 // surfaceEvaluator.inDoEvalCoord2NOGE( t->param[0], t->param[1], temp, ttt);
282 #ifdef USE_OPTTT
283  surfaceEvaluator.inDoEvalCoord2NOGE( t->param[0], t->param[1], t->cache_point, t->cache_normal);
284 #endif
285 }
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
REAL param[2]
Definition: trimvertex.h:45
virtual void inDoEvalCoord2NOGE(REAL u, REAL v, REAL *ret_point, REAL *ret_normal)=0
void Backend::tmeshvertNOGE_BU ( TrimVertex t)

Definition at line 289 of file backend.cc.

290 {
291 #ifdef USE_OPTTT
292  surfaceEvaluator.inDoEvalCoord2NOGE_BU( t->param[0], t->param[1], t->cache_point, t->cache_normal);
293 #endif
294 }
virtual void inDoEvalCoord2NOGE_BU(REAL u, REAL v, REAL *ret_point, REAL *ret_normal)=0
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
REAL param[2]
Definition: trimvertex.h:45
void Backend::tmeshvertNOGE_BV ( TrimVertex t)

Definition at line 298 of file backend.cc.

299 {
300 #ifdef USE_OPTTT
301  surfaceEvaluator.inDoEvalCoord2NOGE_BV( t->param[0], t->param[1], t->cache_point, t->cache_normal);
302 #endif
303 }
BasicSurfaceEvaluator & surfaceEvaluator
Definition: backend.h:49
REAL param[2]
Definition: trimvertex.h:45
virtual void inDoEvalCoord2NOGE_BV(REAL u, REAL v, REAL *ret_point, REAL *ret_normal)=0
void Backend::triangle ( TrimVertex a,
TrimVertex b,
TrimVertex c 
)

Definition at line 517 of file backend.cc.

Referenced by Subdivider::arc_split(), Trimline::getNextPts(), and Trimline::getPrevPts().

518 {
519 /* bgntmesh( "spittriangle" );*/
520  bgntfan();
521  tmeshvert( a );
522  tmeshvert( b );
523  tmeshvert( c );
524  endtfan();
525 /* endtmesh();*/
526 }
void bgntfan()
Definition: backend.cc:185
void tmeshvert(GridTrimVertex *)
Definition: backend.cc:269
void endtfan()
Definition: backend.cc:197

Member Data Documentation

BasicCurveEvaluator& Backend::curveEvaluator
private

Definition at line 48 of file backend.h.

Referenced by bgncurv(), bgnline(), curvgrid(), curvmesh(), curvpt(), curvpts(), endcurv(), endline(), and segment().

REAL Backend::mesh[3][4]
private

Definition at line 108 of file backend.h.

Referenced by tmeshvert().

int Backend::meshindex
private

Definition at line 109 of file backend.h.

Referenced by bgntmesh(), swaptmesh(), and tmeshvert().

int Backend::npts
private

Definition at line 107 of file backend.h.

Referenced by bgntmesh(), and tmeshvert().

int Backend::wireframequads
private

Definition at line 106 of file backend.h.

Referenced by bgnsurf(), and surfmesh().

int Backend::wireframetris
private

Definition at line 105 of file backend.h.

Referenced by bgnsurf(), bgntmesh(), endtmesh(), swaptmesh(), and tmeshvert().


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