您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ transition函数代码示例

51自学网 2021-06-03 08:57:06
  C++
这篇教程C++ transition函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中transition函数的典型用法代码示例。如果您正苦于以下问题:C++ transition函数的具体用法?C++ transition怎么用?C++ transition使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了transition函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: transition

voidMenuManager::set_menu(std::unique_ptr<Menu> menu){  if (menu)  {    transition(m_menu_stack.empty() ? nullptr : m_menu_stack.back().get(),               menu.get());    m_menu_stack.clear();    m_menu_stack.push_back(std::move(menu));  }  else  {    transition(m_menu_stack.empty() ? nullptr : m_menu_stack.back().get(),               nullptr);    m_menu_stack.clear();  }  // just to be sure...  InputManager::current()->reset();}
开发者ID:ChristophKuhfuss,项目名称:supertux,代码行数:20,


示例2: isActive

/*!  Handle a wheel event for the observed widget.  Move the last point of the selection in case of isActive() == true  /sa eventFilter(), widgetMousePressEvent(), widgetMouseReleaseEvent(),      widgetMouseDoubleClickEvent(), widgetMouseMoveEvent(),      widgetKeyPressEvent(), widgetKeyReleaseEvent()*/void QwtPicker::widgetWheelEvent(QWheelEvent *e){    if ( pickRect().contains(e->pos()) )        d_data->labelPosition = e->pos();    else        d_data->labelPosition = QPoint(-1, -1);    updateDisplay();    transition(e);}
开发者ID:chongle,项目名称:prorata,代码行数:20,


示例3: replay

void replay(const char *file_name){	U8 data;	int n = 0;	f = fopen(file_name, "r");	while (!feof(f)) {		fread(&data, 1, 1, f);		transition(data);	}}
开发者ID:ekoeppen,项目名称:saleae_i2s_logger,代码行数:11,


示例4: Arena

void Title::key_released(SDLKey key, SDLMod){	if (key == SDLK_z)	{		Arena *arena = new Arena(m_inputDevice, 1);		transition(arena);	}		if (key == SDLK_x)	{		Arena *arena = new Arena(m_inputDevice, 2);		transition(arena);	}		if (key == SDLK_c)	{		Arena *arena = new Arena(m_inputDevice, 3);		transition(arena);	}}
开发者ID:kotrenn,项目名称:ogam,代码行数:20,


示例5: onMoveReleased

void PlayerSwimmingState :: onMoveReleased ( Direction d){    tempDir = tempDir ^ d;    if(!tempDir.isNone())    {        pData -> dir = tempDir;    }    else        transition(new PlayerDivingState(pData));}
开发者ID:loctho1995,项目名称:DirectX-Contra,代码行数:11,


示例6: simulate

/* make one simulation iteration with lines lines. * old configuration is in from, new one is written to to. */static void simulate(Line *from, Line *to, int lines){   int x,y;     boundary(from, lines);   for (y = 1;  y <= lines;  y++) {      for (x = 1;  x <= XSIZE;  x++) {         to[y][x  ] = transition(from, x  , y);      }   }}
开发者ID:santifa,项目名称:paralleles-rechnen,代码行数:14,


示例7: updateYZedge

/* Calculate the new values of an edge normal to the YZ plane */inline void updateYZedge(int Ix, int Iy, int Iz, unsigned char *data,				 unsigned char *newData, int y, int z, int rank) {	int x;	unsigned char c, old;	for (x=2;x<Ix;x++) {		c = count(Ix, Iy, Iz, data, x, y, z);		old = data[xoff*x + yoff*y + z];		newData[xoff*x + yoff*y + z] = transition(c, old);	}}
开发者ID:Thrasi,项目名称:DistributedConwaysGameOfLife,代码行数:12,


示例8: isActive

/*!  Handle a wheel event for the observed widget.  Move the last point of the selection in case of isActive() == true  /param wheelEvent Wheel event  /sa eventFilter(), widgetMousePressEvent(), widgetMouseReleaseEvent(),      widgetMouseDoubleClickEvent(), widgetMouseMoveEvent(),      widgetKeyPressEvent(), widgetKeyReleaseEvent()*/void QwtPicker::widgetWheelEvent( QWheelEvent *wheelEvent ){    if ( pickArea().contains( wheelEvent->pos() ) )        d_data->trackerPosition = wheelEvent->pos();    else        d_data->trackerPosition = QPoint( -1, -1 );    updateDisplay();    transition( wheelEvent );}
开发者ID:NREL,项目名称:OpenStudio,代码行数:22,


示例9: updateZXedge

/* Calculate the new values of an edge normal to the ZX plane */inline void updateZXedge(int Ix, int Iy, int Iz, unsigned char *data,				 unsigned char *newData, int z, int x, int rank) {	int y;	unsigned char c, old;	for (y=2;y<Iy;y++) {		c = count(Ix, Iy, Iz, data, x, y, z);		old = data[xoff*x + yoff*y + z];		newData[xoff*x + yoff*y + z] = transition(c, old);	}}
开发者ID:Thrasi,项目名称:DistributedConwaysGameOfLife,代码行数:12,


示例10: updateXYedge

/* Calculate the new values of an edge normal to the XY plane */inline void updateXYedge(int Ix, int Iy, int Iz, unsigned char *data,				 unsigned char *newData, int x, int y, int rank) {	int z;	unsigned char c, old;	for (z=2;z<Iz;z++) {		c = count(Ix, Iy, Iz, data, x, y, z);		old = data[xoff*x + yoff*y + z];		newData[xoff*x + yoff*y + z] = transition(c, old);	}}
开发者ID:Thrasi,项目名称:DistributedConwaysGameOfLife,代码行数:12,


示例11: transition

void EnermySoldierFallingState::onUpdate(){    EnermyState::onUpdate();    this->pData->y += this->pData->vy;    this->pData->vy += acceleration;    if (!(this->pData->cSupportRect == CollisionRectF()))    {        transition(new EnermySoldierRunningState(this->pData));    }}
开发者ID:loctho1995,项目名称:DirectX-Contra,代码行数:12,


示例12: eventFilter

/*!  Handle a mouse move event for the observed widget.  /param mouseEvent Mouse event  /sa eventFilter(), widgetMousePressEvent(), widgetMouseReleaseEvent(),      widgetMouseDoubleClickEvent(),      widgetWheelEvent(), widgetKeyPressEvent(), widgetKeyReleaseEvent()*/void QwtPicker::widgetMouseMoveEvent( QMouseEvent *mouseEvent ){    if ( pickArea().contains( mouseEvent->pos() ) )        d_data->trackerPosition = mouseEvent->pos();    else        d_data->trackerPosition = QPoint( -1, -1 );    if ( !isActive() )        updateDisplay();    transition( mouseEvent );}
开发者ID:NREL,项目名称:OpenStudio,代码行数:21,


示例13: with

voidrust_task::block(rust_cond *on, const char* name) {    scoped_lock with(lock);    LOG(this, task, "Blocking on 0x%" PRIxPTR ", cond: 0x%" PRIxPTR,        (uintptr_t) on, (uintptr_t) cond);    A(sched, cond == NULL, "Cannot block an already blocked task.");    A(sched, on != NULL, "Cannot block on a NULL object.");    transition(&sched->running_tasks, &sched->blocked_tasks);    cond = on;    cond_name = name;}
开发者ID:sdwilsh,项目名称:rust,代码行数:12,


示例14: transition

//___________________________________________________________________void LabelData::timerEvent( QTimerEvent* event ) {      if ( event->timerId() == timer_.timerId() ) {            timer_.stop();            // check transition and widget validity            if ( !( enabled() && target_ && transition() ) ) return;            // assign end pixmap            transition().data()->setEndPixmap( transition().data()->grab( target_.data() ) );            // start animation            animate();            }      else if ( event->timerId() == animationLockTimer_.timerId() ) {            unlockAnimations();            // check transition and widget validity            if ( !( enabled() && target_ && transition() ) ) return;            // reassign end pixmap for the next transition to be properly initialized            transition().data()->setEndPixmap( transition().data()->grab( target_.data() ) );            }      else return TransitionData::timerEvent( event );      }
开发者ID:33akash,项目名称:MuseScore,代码行数:30,


示例15: switch

/* Parameters: //////////// Azimuth Elevation Shape Width Height Gain Window*/void Ambix_directional_loudnessAudioProcessor::setParameter (int index, float newValue){    int filter_id = (int)floor(index/PARAMS_PER_FILTER);    if (filter_id < NUM_FILTERS) // safety..    {        _param_changed = true;        switch (index%PARAMS_PER_FILTER) {        case 0:            center_sph(filter_id, 0) = newValue;            break;        case 1:            center_sph(filter_id, 1) = newValue;            break;        case 2:            shape(filter_id) = (newValue <= 0.5f ? 0 : 1.f);            break;        case 3:            width(filter_id) = newValue;            break;        case 4:            height(filter_id) = newValue;            break;        case 5:            gain(filter_id) = newValue;            break;        case 6:            window(filter_id) = newValue > 0.5f ? true : false;            break;        case 7:            transition(filter_id) = newValue;            break;        default:            _param_changed = false;            break;        }    }    sendChangeMessage();}
开发者ID:cchacons,项目名称:ambix,代码行数:63,


示例16: asStructArray

ArrayData* StructArray::SetStr(  ArrayData* ad,  StringData* k,  Cell v,  bool copy) {  auto structArray = asStructArray(ad);  auto shape = structArray->shape();  auto result = structArray;  auto offset = shape->offsetFor(k);  bool isNewProperty = offset == PropertyTable::kInvalidOffset;  auto convertToMixedAndAdd = [&]() {    auto mixed = copy ? ToMixedCopy(structArray) : ToMixed(structArray);    return mixed->addValNoAsserts(k, v);  };  if (isNewProperty) {    StringData* staticKey;    // We don't support adding non-static strings yet.    if (k->isStatic()) {      staticKey = k;    } else {      staticKey = lookupStaticString(k);      if (!staticKey) return convertToMixedAndAdd();    }    auto newShape = shape->transition(staticKey);    if (!newShape) return convertToMixedAndAdd();    result = copy ? CopyAndResizeIfNeeded(structArray, newShape)                  : ResizeIfNeeded(structArray, newShape);    offset = result->shape()->offsetFor(staticKey);    assert(offset != PropertyTable::kInvalidOffset);    TypedValue* dst = &result->data()[offset];    // TODO(#3888164): we should restructure things so we don't have to    // check KindOfUninit here.    if (UNLIKELY(v.m_type == KindOfUninit)) v = make_tv<KindOfNull>();    cellDup(v, *dst);    return result;  }  if (copy) {    result = asStructArray(Copy(structArray));  }  assert(offset != PropertyTable::kInvalidOffset);  TypedValue* dst = &result->data()[offset];  if (UNLIKELY(v.m_type == KindOfUninit)) v = make_tv<KindOfNull>();  cellSet(v, *tvToCell(dst));  return result;}
开发者ID:KOgames,项目名称:hhvm,代码行数:52,


示例17: fn

void parse_table::for_each(buffer<transition> & ts,                           std::function<void(unsigned, transition const *,                                              list<accepting> const &)> const & fn) const {    if (!is_nil(m_ptr->m_accept))        fn(ts.size(), ts.data(), m_ptr->m_accept);    m_ptr->m_children.for_each([&](name const & k, list<pair<action, parse_table>> const & lst) {            for (auto const & p : lst) {                ts.push_back(transition(k, p.first));                p.second.for_each(ts, fn);                ts.pop_back();            }        });}
开发者ID:vishallama,项目名称:lean,代码行数:13,


示例18: sprintf

void StateManager::registerState(std::string name, GameState* state) {	if(states.count(name) > 0) {		char buf[256];		sprintf(buf, "Error: trying to duplicate existing state %s", name.c_str());		LOG(buf);		return;	}	states[name] = state;	if(firstState) {		transition(name);	}	firstState = false;}
开发者ID:AlexanderDzhoganov,项目名称:RIGE--RIGE-Is-A-Games-Engine-,代码行数:13,


示例19: add

static int add(lua_State * L) {    int nargs = lua_gettop(L);    buffer<transition> ts;    luaL_checktype(L, 2, LUA_TTABLE);    int sz = objlen(L, 2);    for (int i = 1; i <= sz; i++) {        lua_rawgeti(L, 2, i);        if (lua_isstring(L, -1) || is_name(L, -1)) {            ts.push_back(transition(to_name_ext(L, -1), mk_expr_action()));            lua_pop(L, 1);        } else {            luaL_checktype(L, -1, LUA_TTABLE);            lua_rawgeti(L, -1, 1);            lua_rawgeti(L, -2, 2);            ts.push_back(transition(to_name_ext(L, -2), to_notation_action_ext(L, -1)));            lua_pop(L, 3);        }    }    bool overload = (nargs <= 3) || lua_toboolean(L, 4);    return push_parse_table(L, to_parse_table(L, 1).add(ts.size(), ts.data(), to_expr(L, 3), LEAN_DEFAULT_NOTATION_PRIORITY,                                                        overload));}
开发者ID:vishallama,项目名称:lean,代码行数:22,


示例20: onVeticalDirectionPressed

void PlayerSwimmingState :: onVeticalDirectionPressed( Direction d){    pData ->verticalDir = d;    if(d.isDown())    {        //pData ->iCurrentArr = PlayerData :: RUNDOWN;        transition(new PlayerDivingState(pData));    }    else    {        pData ->setiCurrentArray (PlayerData :: SWIMUP) ;    }}
开发者ID:loctho1995,项目名称:DirectX-Contra,代码行数:13,


示例21: transition

void transition(const STATE state) {    switch (state) {        case STATE_INIT:            xy_startup();            transition(STATE_RUNNING);            break;        case STATE_RUNNING:            main_loop();            break;        case STATE_RESTARTING:            xy_shutting_down();            xy_restart();            break;        case STATE_SHUTTING_DOWN:            xy_shutting_down();            transition(STATE_SHUTDOWN);            break;        case STATE_SHUTDOWN:            xy_shutdown();            break;    }}
开发者ID:nbargnesi,项目名称:xy,代码行数:22,


示例22: transition

//___________________________________________________________________bool StackedWidgetData::initializeAnimation( void ) {      // check enability      if ( !( target_ && target_.data()->isVisible() ) ) {            return false;            }      // check index      if ( target_.data()->currentIndex() == index_ ) {            return false;            }      // do not animate if either index or currentIndex is not valid      // but update index_ none the less      if ( target_.data()->currentIndex() < 0 || index_ < 0 ) {            index_ = target_.data()->currentIndex();            return false;            }      // get old widget (matching index_) and initialize transition      if ( QWidget* widget = target_.data()->widget( index_ ) ) {            transition().data()->setOpacity( 0 );            startClock();            transition().data()->setGeometry( widget->geometry() );            transition().data()->setStartPixmap( transition().data()->grab( widget ) );            index_ = target_.data()->currentIndex();            return !slow();            }      else {            index_ = target_.data()->currentIndex();            return false;            }      }
开发者ID:33akash,项目名称:MuseScore,代码行数:40,


示例23: main

task main(){  initialize ();  // In the original template this was "initializeRobot();"  waitForStart (); // Wait for the beginning of autonomous phase.  clasp_goal(true);  distanceToDrive = 72.0; //6 feet  drive_both_wheels (-motorSpeed, -motorSpeed, distanceToDrive * kInch); //drives out of parking zone to kickstand  int i = 0;  for(i = 0; i <= 1; i++){  	distanceToDrive = 6.0; //6 in  	drive_both_wheels (motorSpeed, motorSpeed, distanceToDrive * kInch);  	distanceToDrive = 10.0 //10 in  	drive_both_wheels (-motorSpeed, -motorSpeed, distanceToDrive * kInch);  }  distanceToDrive = 12.0; //12 in  drive_both_wheels(motorSpeed, motorSpeed, distanceToDrive * kInch); //backs up to angle for final try  degreesToTurn = 90.0; //90 degrees  TurnLeft(degreesToTurn * kDegrees); //turns 90 degrees  distanceToDrive = 10.0; //10 in  drive_both_wheels(motorSpeed, motorSpeed, distanceToDrive * kInch); //drives 4 in  degreesToTurn = 90.0; //90 degrees  TurnRight(degreesToTurn * kDegrees); //turns 90 degrees  distanceToDrive = 30.0; //2.5 feet  drive_both_wheels(-motorSpeed, -motorSpeed, distanceToDrive * kInch); //comes in for final try to knock down the kickstand  for(i = 0; i <= 1; i++){  	distanceToDrive = 6.0; //6 in  	drive_both_wheels (motorSpeed, motorSpeed, distanceToDrive * kInch);  	distanceToDrive = 10.0; //10 in  	drive_both_wheels (-motorSpeed, -motorSpeed, distanceToDrive * kInch);  }  //the program basically flails around to knock down the kickstand  transition(); //waits for autonomous phase to end} // main
开发者ID:Mikaburrie,项目名称:FTCRobot2,代码行数:50,


示例24: transition

void Boss2FinalHeadShuttingState::onUpdate(){    EnermyState::onUpdate();    if (frameCountOpen >= 0)    {        frameCountOpen--;    }    else    {        transition(new Boss2FinalHeadOpeningState(this->pData));        return;    }}
开发者ID:loctho1995,项目名称:DirectX-Contra,代码行数:14,


示例25: getInstance

void EnemyBazokaFiringState::onUpdate(){	EnermyState::onUpdate();	if(counter == 0)	{		Sound:: getInstance() -> play("shootM", false, 1);		pData -> bulletsVector.push_back(new MBullet(pData -> x - pData -> ppTextureArrays[pData -> iCurrentArr] -> getWidth() /2, pData -> y - 25, 3.0f, M_PI));	}	counter ++;	if(counter >= nHoldingFrames )	{		transition(new EnemyBazokaStandingState(pData));	}}
开发者ID:loctho1995,项目名称:DirectX-Contra,代码行数:14,


示例26: on_invertCheckBox_clicked

void LumaMixTransition::on_lumaCombo_activated(int index){    if (index == kLumaComboDissolveIndex || index == kLumaComboCutIndex) {        on_invertCheckBox_clicked(false);        ui->invertCheckBox->setChecked(false);    }    ui->invertCheckBox->setEnabled( index != kLumaComboDissolveIndex && index != kLumaComboCutIndex);    ui->softnessSlider->setEnabled( index != kLumaComboDissolveIndex);    ui->softnessSpinner->setEnabled(index != kLumaComboDissolveIndex);    QScopedPointer<Mlt::Transition> transition(getTransition("luma"));    if (transition && transition->is_valid()) {        if (index == kLumaComboDissolveIndex) {            transition->set("resource", "");            ui->softnessLabel->setText(tr("Softness"));        } else if (index == kLumaComboCutIndex) { // Cut            ui->softnessLabel->setText(tr("Position"));            ui->softnessSlider->setValue(50);        } else if (index == kLumaComboCustomIndex) {            ui->softnessLabel->setText(tr("Softness"));            // Custom file            QString path = Settings.openPath();#ifdef Q_OS_MAC            path.append("/*");#endif            QString filename = QFileDialog::getOpenFileName(this, tr("Open File"), path,                tr("Images (*.bmp *.jpeg *.jpg *.pgm *.png *.svg *.tga *.tif *.tiff);;All Files (*)"));            activateWindow();            if (!filename.isEmpty()) {                transition->set("resource", filename.toUtf8().constData());                MAIN.getHash(*transition);            }        } else {            ui->softnessLabel->setText(tr("Softness"));            transition->set("resource", QString("%luma%1.pgm").arg(index - 1, 2, 10, QChar('0')).toLatin1().constData());        }        if (qstrcmp(transition->get("resource"), "")) {            transition->set("progressive", 1);            if (index == kLumaComboCutIndex) {                transition->set("invert", 0);                transition->set("softness", 0);            } else {                transition->set("invert", ui->invertCheckBox->isChecked());                transition->set("softness", ui->softnessSlider->value() / 100.0);            }        }        updateCustomLumaLabel(*transition);        MLT.refreshConsumer();    }}
开发者ID:UriChan,项目名称:shotcut,代码行数:50,


示例27: TransitionData

    //______________________________________________________    LabelData::LabelData( QObject* parent, QLabel* target, int duration ):        TransitionData( parent, target, duration ),        _target( target )    {        _target.data()->installEventFilter( this );        const bool hasProxy( _target.data()->graphicsProxyWidget() );        const bool hasMessageWidget( hasParent( target, "KMessageWidget" ) );        transition().data()->setFlags( hasProxy||hasMessageWidget ? TransitionWidget::Transparent : TransitionWidget::GrabFromWindow );        connect( _target.data(), SIGNAL(destroyed()), SLOT(targetDestroyed()) );    }
开发者ID:badzso,项目名称:oxygen,代码行数:15,



注:本文中的transition函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ translateAndMapModelObject函数代码示例
C++ transform_point函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。