本文整理汇总了C++中GLWindow::setMap方法的典型用法代码示例。如果您正苦于以下问题:C++ GLWindow::setMap方法的具体用法?C++ GLWindow::setMap怎么用?C++ GLWindow::setMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GLWindow
的用法示例。
在下文中一共展示了GLWindow::setMap方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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();
}
示例3: 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();
}
示例4: 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();
}
示例5: 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();
}
示例6: 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();
}