本文整理汇总了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);
}
}
示例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();
}
}
示例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);
}
}