本文整理汇总了C++中GLWindow::redraw方法的典型用法代码示例。如果您正苦于以下问题:C++ GLWindow::redraw方法的具体用法?C++ GLWindow::redraw怎么用?C++ GLWindow::redraw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GLWindow
的用法示例。
在下文中一共展示了GLWindow::redraw方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: snowCB
void Display::snowCB(Fl_Value_Input* w, Display* c)
{
Map* m = c->getMap();
m->setSnow(w->value());
GLWindow* win = c->getGWin();
win->setMap(m);
win->redraw();
}
示例2: topCB
void Display::topCB(Fl_Button* w, Display* d)
{
GLWindow* g = d->getGWin();
Camera* c = g->getCam();
c->setTheta(-70);
g->setCam(c);
g->redraw();
}
示例3: sideCB
void Display::sideCB(Fl_Button* w, Display* d)
{
GLWindow* g = d->getGWin();
Camera* c = g->getCam();
c->setPhi(4);
g->setCam(c);
g->redraw();
}
示例4: colorCB
void Display::colorCB(Fl_Color_Chooser* color, Display* d)
{
Map* m = d->getMap();
m->setColor(color->r(), color->g(), color->b());
GLWindow* win = d->getGWin();
win->setMap(m);
win->redraw();
}
示例5: bothCB
void Display::bothCB(Fl_Round_Button* b, Display* d)
{
Map* m = d->getMap();
m->setType(2);
GLWindow* win = d->getGWin();
win->setMap(m);
win->redraw();
}
示例6: subCB
void Display::subCB(Fl_Button* w, Display* c)
{
Map* m = c->getMap();
//std::cout<<m->getHeights(0, 0) << std::endl;
m->fractalize();
//std::cout << m->getHeights(5, 4) << std::endl;
GLWindow* win = c->getGWin();
win->setMap(m);
win->redraw();
}
示例7: hCB
void Display::hCB(Fl_Slider* s, Display* d)
{
s->range(d->min, d->max);
Map* m = d->getMap();
m->changeCoord(d->tile_x, d->tile_y, s->value());
float height = m->getHeights(d->tile_x, d->tile_y);
s->value(height);
GLWindow* win = d->getGWin();
win->setMap(m);
win->redraw();
}
示例8: upCB
void Display::upCB(Fl_Button* w, Display* d)
{
Map* m = d->getMap();
GLWindow* win = d->getGWin();
//std::cout << d->tile_x <<d->tile_y<< std::endl;
if (d->tile_y == 0)
d->tile_y = m->getRow()-1;
else
d->tile_y--;
win->setColor(d->tile_x, d->tile_y);
win->redraw();
}
示例9: createCB
void Display::createCB(Fl_Button* w, Display* c){
Map* m = c->getMap();
c->tile_x = c->tile_y = 0;
m->setSize(c->r,c->c,c->x,c->y);
//std::cout << c->max << std::endl;
m->setRange(c->max, c->min);
m->createMap();
GLWindow* win = c->getGWin();
win->setColor(c->tile_x, c->tile_y);
win->setMap(m);
win->redraw();
}
示例10: rightCB
void Display::rightCB(Fl_Button* w, Display* d)
{
Map* m = d->getMap();
GLWindow* win = d->getGWin();
//std::cout << d->tile_x <<d->tile_y<< std::endl;
if (d->tile_x == m->getCol() - 1)
d->tile_x = 0;
else
d->tile_x++;
win->setColor(d->tile_x, d->tile_y);
win->redraw();
}
示例11: updateModule
bool updateModule(){
static int userLastStatus[MAX_USERS] = {-1};
for(int userID = 0; userID < MAX_USERS; userID++){
if(userLastStatus[userID] != _kinect->getSkeletonState(userID)){
userLastStatus[userID] = _kinect->getSkeletonState(userID);
printf("USER %d HAS STATUS %d\n",userID,userLastStatus[userID]);
}
Matrix skeletonOrientation[TOTAL_JOINTS];
Vector skeletonPosition[TOTAL_JOINTS];
double confPosition[TOTAL_JOINTS], confOrientation[TOTAL_JOINTS];
if(!_kinect->getSkeletonOrientation(skeletonOrientation,confOrientation,userID)) continue;
_kinect->getSkeletonPosition(skeletonPosition,confPosition,userID);
_glWindow->setData(userID,userLastStatus[userID],skeletonOrientation, confPosition,skeletonPosition,confOrientation);
_glWindow->redraw();
}
ImageOf<PixelInt> img = _kinect->getDepthMap();
imgPort.prepare() = img;
imgPort.write();
return true;
};