当前位置: 首页>>代码示例>>C++>>正文


C++ Interpolator::GetKeyTime方法代码示例

本文整理汇总了C++中Interpolator::GetKeyTime方法的典型用法代码示例。如果您正苦于以下问题:C++ Interpolator::GetKeyTime方法的具体用法?C++ Interpolator::GetKeyTime怎么用?C++ Interpolator::GetKeyTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Interpolator的用法示例。


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

示例1: UpdateText

void KeyListCtrl::UpdateText()
{
	VRenderFrame* vr_frame = (VRenderFrame*)m_frame;
	if (!vr_frame)
		return;
	Interpolator* interpolator = vr_frame->GetInterpolator();
	if (!interpolator)
		return;

	wxString str;

	for (int i=0; i<interpolator->GetKeyNum(); i++)
	{
		int id = interpolator->GetKeyID(i);
		int time = interpolator->GetKeyTime(i);
		int duration = interpolator->GetKeyDuration(i);
		int interp = interpolator->GetKeyType(i);
		string desc = interpolator->GetKeyDesc(i);
		
        wxString wx_id = wxString::Format("%d", id);
        wxString wx_time = wxString::Format("%d", time);
        wxString wx_duration = wxString::Format("%d", duration);
		SetText(i, 0, wx_id);
		SetText(i, 1, wx_time);
		SetText(i, 2, wx_duration);
		str = interp==0?"Linear":"Smooth";
		SetText(i, 3, str);
		str = desc;
		SetText(i, 4, str);
	}
}
开发者ID:takashi310,项目名称:VVD_Viewer,代码行数:31,代码来源:RecorderDlg.cpp

示例2: OnAct

void KeyListCtrl::OnAct(wxListEvent &event)
{
	long item = GetNextItem(-1,
		wxLIST_NEXT_ALL,
		wxLIST_STATE_SELECTED);
	if (item == -1)
		return;
	wxString str = GetItemText(item);
	long id;
	str.ToLong(&id);

	VRenderFrame* vr_frame = (VRenderFrame*)m_frame;
	if (!vr_frame)
		return;
	Interpolator* interpolator = vr_frame->GetInterpolator();
	if (!interpolator)
		return;

	int index = interpolator->GetKeyIndex(int(id));
	double time = interpolator->GetKeyTime(index);
	VRenderView* view = vr_frame->GetRecorderDlg()->GetView();
	if (!view)
		view = vr_frame->GetView(0);
	if (view)
	{
		view->m_glview->SetParams(time);
		view->RefreshGL();
	}
}
开发者ID:takashi310,项目名称:VVD_Viewer,代码行数:29,代码来源:RecorderDlg.cpp

示例3: Update

void KeyListCtrl::Update()
{
	m_frame_text->Hide();
	m_duration_text->Hide();
	m_interpolation_cmb->Hide();
	m_description_text->Hide();
	m_editing_item = -1;

	VRenderFrame* vr_frame = (VRenderFrame*)m_frame;
	if (!vr_frame)
		return;
	Interpolator* interpolator = vr_frame->GetInterpolator();
	if (!interpolator)
		return;

	DeleteAllItems();
	for (int i=0; i<interpolator->GetKeyNum(); i++)
	{
		int id = interpolator->GetKeyID(i);
		int time = interpolator->GetKeyTime(i);
		int duration = interpolator->GetKeyDuration(i);
		int interp = interpolator->GetKeyType(i);
		string desc = interpolator->GetKeyDesc(i);
		Append(id, time, duration, interp, desc);
	}
}
开发者ID:takashi310,项目名称:VVD_Viewer,代码行数:26,代码来源:RecorderDlg.cpp


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