void MSWidget::firstMap(MSBoolean firstMap_) { if (firstMap()!=firstMap_) { _firstMap=firstMap_; if (firstMap()==MSTrue) firstMapNotify(); } }
void _SoNurbsSurfaceEvaluator::bgnqstrip( void ) { glBegin(GL_TRIANGLES); for( _SoNurbsSurfaceMap *map = firstMap(); isMap( map ); map = nextMap(map) ) map->startNewTriStrip(); }
void _SoNurbsSurfaceEvaluator::bgnclosedline( void ) { glBegin(GL_LINE_LOOP); for( _SoNurbsSurfaceMap *map = firstMap(); isMap( map ); map = nextMap(map) ) map->startNewTriStrip(); }
void _SoNurbsSurfaceEvaluator::setv( REAL v, int index ) { valid[index][0] = valid[index][1] = 0; vvals[index] = v; for( _SoNurbsSurfaceMap *map = firstMap(); isMap( map ); map = nextMap(map) ) map->setv( v, index ); }
_SoNurbsSurfaceMap * _SoNurbsSurfaceEvaluator::typeToMap( long type ) { _SoNurbsSurfaceMap *map; for( map = firstMap(); map; map = nextMap(map) ) if( map->isType( type ) ) break; return map; }
/*------------------------------------------------------------------------- * bgnmap2f - preamble to surface definition and evaluations *------------------------------------------------------------------------- */ void _SoNurbsSurfaceEvaluator::bgnmap2f( long ) { for( _SoNurbsSurfaceMap *map = firstMap(); isMap( map ); map = nextMap(map) ) map->disable(); lru = 0; vvals[0] = vvals[1] = vvals[2] =*(REAL *)(& NaN); validreset(); }
void MSWidget::map(void) { if (mapped()==MSFalse) { _mapped=MSTrue; if (firstMap()==MSFalse) firstMap(MSTrue); childMapNotify(); if (_window!=0) XMapWindow(display(),_window); MSWidget *p=_owner; MSBoolean unobscured=MSTrue; for (;p!=0;p=p->_owner) { if (p->mapped()==MSFalse) { unobscured=MSFalse; break; } } if (unobscured==MSTrue) visibilityUnobscured(); } }
/*------------------------------------------------------------------------- * compute - output cached point or evaluate point and output *------------------------------------------------------------------------- */ void _SoNurbsSurfaceEvaluator::compute( REAL *domain, int index, int place ) { assert( vvals[index] == domain[1] ); if( ((place >= valid[index][0]) && (place < valid[index][1])) ) { assert( place != 0 ); for( _SoNurbsSurfaceMap *map = firstMap(); isMap( map ); map = nextMap(map) ) map->output( domain, index, place ); } else { if( place >= MAXCACHED ) { place = 0; } else if( place == valid[index][1] ) { valid[index][1]++; } else if( valid[index][0] == valid[index][1] ) { valid[index][0] = place; valid[index][1] = place+1; } else if( place == valid[index][0]-1 ) { valid[index][0]--; } mapeval( domain, index, place ); } }
void _SoNurbsSurfaceEvaluator::mapeval( REAL *domain, int index, int place ) { for( _SoNurbsSurfaceMap *map = firstMap(); isMap( map ); map = nextMap(map) ) map->mapeval( domain, index, place ); }
/*------------------------------------------------------------------------- * endmap2f - postamble to a map *------------------------------------------------------------------------- */ void _SoNurbsSurfaceEvaluator::endmap2f( void ) { for( _SoNurbsSurfaceMap *map = firstMap(); isMap( map ); map = nextMap(map) ) map->disable(); }
void _SoNurbsSurfaceEvaluator::swaptmesh( void ) { for( _SoNurbsSurfaceMap *map = firstMap(); isMap( map ); map = nextMap(map) ) map->swapTriStripVertices(); }