• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ Timeline类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getNewObjectInfoInstance

void Variable::setupDefaultInAnimation(Animation * animation, int objectId, int variableId)
{
    Timeline *newVariableTimeline = animation->setVariableTimeline(objectId, variableId);
    if (newVariableTimeline)
    {
        UniversalObjectInterface *newObjectInfo = getNewObjectInfoInstance();
        switch (variableType)
        {
        case VARIABLETYPE_STRING:
            newObjectInfo->setStringValue(defaultValue->getStringValue());
            break;

        case VARIABLETYPE_INT:
            newObjectInfo->setIntValue(defaultValue->getIntValue());
            break;

        case VARIABLETYPE_REAL:
            newObjectInfo->setRealValue(defaultValue->getRealValue());
            break;

        default:
            Settings::error("Variable::setupDefaultInAnimation - invalid variable type");
            break;
        }

        TimelineKey *newTimelineKey = newVariableTimeline->pushBackKey(new TimeInfo(0, 0, new InstantEasingCurve()), newObjectInfo);
        newTimelineKey->setNextObjectInfo(newObjectInfo);
    }
}
开发者ID:Riyyi,项目名称:engine,代码行数:29,代码来源:variable.cpp


示例2: assemble

void Swatch::assemble( Timeline &timeline )
{
	float dur = 0.2f;
//	mPos = mAnchorPos + vec2( 15.0f, 0.0f );
	timeline.apply( &mPos, mAnchorPos, dur, EaseOutAtan( 10 ) ).finishFn( bind( &Swatch::setDeselected, this ) );
	timeline.apply( &mScale, 1.0f, dur, EaseOutAtan( 10 ) );
}
开发者ID:ChristophPacher,项目名称:Cinder,代码行数:7,代码来源:Swatch.cpp


示例3: dump

//печать анимации
void dump (const Timeline& timeline, int level)
{
  print_space (level++);
  printf      ("Timeline '%s'\n", timeline.Name ());

  dump ("layers", timeline.Layers (), level);
}
开发者ID:untgames,项目名称:funner,代码行数:8,代码来源:xfl_load.cpp


示例4: onChecked

bool TimelineCommand::onChecked(Context* ctx) {
  MainWindow* mainWin = App::instance()->mainWindow();
  if (!mainWin)
    return false;

  Timeline* timelineWin = mainWin->getTimeline();
  return (timelineWin && timelineWin->isVisible());
}
开发者ID:aseprite,项目名称:aseprite,代码行数:8,代码来源:cmd_timeline.cpp


示例5: TEST

TEST(Timeline,empty) {
	EXPECT_TRUE(Timeline().empty());
	Timeline t;
	t.emplace_back();
	t.emplace_back();
	EXPECT_TRUE(t.empty());
	t.front().add(0, Clip { 1 });
}
开发者ID:JohanAberg,项目名称:duke,代码行数:8,代码来源:timeline.cpp


示例6: isDocRangeEnabled

bool CmdTransaction::isDocRangeEnabled() const
{
#ifdef ENABLE_UI
  if (App::instance()) {
    Timeline* timeline = App::instance()->timeline();
    if (timeline && timeline->range().enabled())
      return true;
  }
#endif
  return false;
}
开发者ID:imeteora,项目名称:aseprite,代码行数:11,代码来源:cmd_transaction.cpp


示例7:

void
TimelineGroup::OnCollectionChanged (Collection *col, CollectionChangedEventArgs *args)
{
	if (PropertyHasValueNoAutoCreate (TimelineGroup::ChildrenProperty, col)) {
		if (args->GetChangedAction() == CollectionChangedActionAdd ||
		    args->GetChangedAction() == CollectionChangedActionReplace) {
			Timeline *timeline = args->GetNewItem()->AsTimeline ();
			if (timeline)
				timeline->SetHadParent (true);
		}
	}
}
开发者ID:lewing,项目名称:moon,代码行数:12,代码来源:timeline.cpp


示例8: clone

Timeline* Timeline::clone()
{
    Timeline* timeline = Timeline::create();
    timeline->_actionTag = _actionTag;

    CCObject* object = NULL;
    CCARRAY_FOREACH(_frames, object)
    {
        Frame* frame = static_cast<Frame*>(object);
        Frame* newFrame = frame->clone();
        timeline->addFrame(newFrame);
    }
开发者ID:1085075003,项目名称:quick-cocos2d-x,代码行数:12,代码来源:CCTimeLine.cpp


示例9: Get

bool Timelines::Get(const string& key, Timeline& results) {
	int size = (int)sizeof(double);
	void* records = tcbdbget(this->database, key.c_str(), key.size(), &size);
	
	if(records != NULL) {
		size_t count = size / sizeof(double);
		results.insert(results.end(), (double*)records, (double*)records + count);
		free(records);
		return true;
	} else {
		return false;
	}
}
开发者ID:besquared,项目名称:Twazlr,代码行数:13,代码来源:Timelines.cpp


示例10: Timeline

NS_TIMELINE_BEGIN

Timeline* Timeline::create()
{
    Timeline* object = new Timeline();
    if (object && object->init())
    {
        object->autorelease();
        return object;
    }
    CC_SAFE_DELETE(object);
    return NULL;
}
开发者ID:1085075003,项目名称:quick-cocos2d-x,代码行数:13,代码来源:CCTimeLine.cpp


示例11: clone

Timeline* Timeline::clone()
{
    Timeline* timeline = Timeline::create();
    timeline->_actionTag = _actionTag;

    for (auto frame : _frames)
    {
        Frame* newFrame = frame->clone();
        timeline->addFrame(newFrame);
    }

    return timeline;
}
开发者ID:RyunosukeOno,项目名称:rayjack,代码行数:13,代码来源:CCTimeLine.cpp


示例12: new

NS_TIMELINE_BEGIN

Timeline* Timeline::create()
{
    Timeline* object = new (std::nothrow) Timeline();
    if (object)
    {
        object->autorelease();
        return object;
    }
    CC_SAFE_DELETE(object);
    return nullptr;
}
开发者ID:RyunosukeOno,项目名称:rayjack,代码行数:13,代码来源:CCTimeLine.cpp


示例13: testFind

void testFind(const Timeline<int>& timeline, FindMode findMode, const initializer_list<Timed<int>*> expectedResults) {
	int i = -1;
	for (Timed<int>* expectedResult : expectedResults) {
		auto it = timeline.find(centiseconds(++i), findMode);
		if (expectedResult != nullptr) {
			EXPECT_NE(it, timeline.end()) << "Timeline: " << timeline << "; findMode: " << static_cast<int>(findMode) << "; i: " << i;
			if (it != timeline.end()) {
				EXPECT_EQ(*expectedResult, *it) << "Timeline: " << timeline << "; findMode: " << static_cast<int>(findMode) << "; i: " << i;
			}
		} else {
			EXPECT_EQ(timeline.end(), it) << "Timeline: " << timeline << "; findMode: " << static_cast<int>(findMode) << "; i: " << i;
		}
	}
}
开发者ID:DanielSWolf,项目名称:rhubarb-lip-sync,代码行数:14,代码来源:TimelineTests.cpp


示例14: calcDocRange

DocRange CmdTransaction::calcDocRange() const
{
#ifdef ENABLE_UI
  // TODO We cannot use Context::activeSite() because it losts
  //      important information about the DocRange() (type and
  //      flags).
  if (App::instance()) {
    Timeline* timeline = App::instance()->timeline();
    if (timeline)
      return timeline->range();
  }
#endif
  return DocRange();
}
开发者ID:imeteora,项目名称:aseprite,代码行数:14,代码来源:cmd_transaction.cpp


示例15: GetChildren

// Validate this TimelineGroup by validating all of it's children
bool
TimelineGroup::Validate ()
{
	TimelineCollection *collection = GetChildren ();
	Timeline *timeline;
	
	int count = collection->GetCount ();
	for (int i = 0; i < count; i++) {
		timeline = collection->GetValueAt (i)->AsTimeline ();
		if (!timeline->Validate ())
			return false;
	}
	
	return Timeline::Validate ();
}
开发者ID:lewing,项目名称:moon,代码行数:16,代码来源:timeline.cpp


示例16: if

    void
    Plan::fillTimeline(Timeline& tl)
    {
      float execution_duration = getExecutionDuration();

      std::vector<IMC::PlanManeuver*>::const_iterator itr;
      itr = m_seq_nodes.begin();

      // Maneuver's start and end ETA
      float maneuver_start_eta = -1.0;
      float maneuver_end_eta = -1.0;

      // Iterate through plan maneuvers
      for (; itr != m_seq_nodes.end(); ++itr)
      {
        if (itr == m_seq_nodes.begin())
          maneuver_start_eta = execution_duration;
        else
          maneuver_start_eta = maneuver_end_eta;

        TimeProfile::const_iterator dur;
        dur = m_profiles->find((*itr)->maneuver_id);

        if (dur == m_profiles->end())
          maneuver_end_eta = -1.0;
        else if (dur->second.durations.size())
          maneuver_end_eta = execution_duration - dur->second.durations.back();
        else
          maneuver_end_eta = -1.0;

        // Fill timeline
        tl.setManeuverETA((*itr)->maneuver_id, maneuver_start_eta, maneuver_end_eta);
      }
    }
开发者ID:FreddyFox,项目名称:dune,代码行数:34,代码来源:Plan.cpp


示例17: mouseOff

void Item::mouseOff( Timeline &timeline )
{
	if( !mIsBeingSelected ){
		float dur = 0.4f;
		
		// title
		timeline.apply( &mTitlePos, mTitleStart, dur, EaseOutBounce( 1.0f ) );
		timeline.apply( &mTitleColor, Color( 0.7f, 0.7f, 0.7f ), 0.05f, EaseOutAtan( 10 ) );
		
		// bar
		timeline.apply( &mBarColor, Color( 0, 0, 0 ), 0.2f, EaseOutAtan( 10 ) );
		timeline.apply( &mBarAlpha, 0.0f, 0.2f, EaseOutAtan( 10 ) );
		timeline.apply( &mBarWidth, 0.0f, 0.2f, EaseInAtan( 10 ) );

		for( std::vector<Swatch>::iterator swatchIt = mSwatches.begin(); swatchIt != mSwatches.end(); ++swatchIt ) {
			swatchIt->mouseOff( timeline );
		}
	}
}
开发者ID:AbdelghaniDr,项目名称:Cinder,代码行数:19,代码来源:Item.cpp


示例18: mouseOver

void Item::mouseOver( Timeline &timeline )
{
	if( !mIsBeingSelected ){
		float dur = 0.2f;
		
		// title
		timeline.apply( &mTitlePos, mMouseOverDest, dur, EaseOutAtan( 10 ) );
		timeline.apply( &mTitleColor, Color( 1, 1, 1 ), 0.05f, EaseOutAtan( 10 ) );
		
		// bar
		timeline.apply( &mBarColor, Color( 0, 0, 0 ), dur, EaseOutAtan( 10 ) );
		timeline.apply( &mBarAlpha, 0.4f, dur, EaseOutAtan( 10 ) );
		timeline.apply( &mBarWidth, mMaxBarWidth, dur, EaseOutAtan( 10 ) );

		for( std::vector<Swatch>::iterator swatchIt = mSwatches.begin(); swatchIt != mSwatches.end(); ++swatchIt ) {
			swatchIt->mouseOver( timeline );
		}
	}
}
开发者ID:AbdelghaniDr,项目名称:Cinder,代码行数:19,代码来源:Item.cpp


示例19: operator

void ActClipSetTimeRange::operator()(int currentTime, int value)
{
    Projet& projet = Projet::getInstance();
    Timeline timeline = projet.getTimeline();

    std::string idClip = timeline.findCurrentClip(currentTime);

    std::ostringstream oss;
    oss<<value;
    IUndoRedoCommand* cmd = new CmdClipSetTimeRange(idClip,"Commande Clip Set Time Range"+oss.str()
    , value);

    //find the command manager thanks to the application (core)
    CommandManager& cmdMng = projet.getCommandManager();

    //add the command to the command manager
    cmdMng.pushNewCommand(cmd);
    
}
开发者ID:Elfhir,项目名称:tweedy,代码行数:19,代码来源:ActClipSetTimeRange.cpp


示例20: loadTimeline

Timeline* ActionTimelineCache::loadTimeline(const rapidjson::Value& json)
{
    Timeline* timeline = nullptr;

    // get frame type 
    const char* frameType = DICTOOL->getStringValue_json(json, FRAME_TYPE);
    if(frameType == nullptr)
        return nullptr;

    if(frameType && _funcs.find(frameType) != _funcs.end())
    {
        timeline = Timeline::create();

        int actionTag = DICTOOL->getIntValue_json(json, ACTION_TAG);
        timeline->setActionTag(actionTag);

        FrameCreateFunc func = _funcs.at(frameType);

        int length = DICTOOL->getArrayCount_json(json, FRAMES);
        for (int i = 0; i<length; i++)
        {
            const rapidjson::Value& dic = DICTOOL->getSubDictionary_json(json, FRAMES, i);

            Frame* frame = nullptr;

            if (func != nullptr)
            {
                frame = func(dic);

                int frameIndex = DICTOOL->getIntValue_json(dic, FRAME_INDEX);
                frame->setFrameIndex(frameIndex);

                bool tween = DICTOOL->getBooleanValue_json(dic, TWEEN, false);
                frame->setTween(tween);
            }

            timeline->addFrame(frame);
        }
    }

    return timeline;
}
开发者ID:980538137,项目名称:MyGame-QuickCocos2dx,代码行数:42,代码来源:CCActionTimelineCache.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ Timeout类代码示例发布时间:2022-05-31
下一篇:
C++ TimedEvent类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap