本文整理汇总了C++中seq::emplace_back方法的典型用法代码示例。如果您正苦于以下问题:C++ seq::emplace_back方法的具体用法?C++ seq::emplace_back怎么用?C++ seq::emplace_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类seq
的用法示例。
在下文中一共展示了seq::emplace_back方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initFromData
/// Initialize from data.
///
/// \param data Frame data.
/// \param bone_amount Amount of bone elements.
void initFromData(const int16_t *data, unsigned frame_amount, float scale)
{
m_time = fixed_8_8_to_float(data[0]);
//std::cout << m_time << std::endl;
#if defined(USE_LD)
if((frame_amount % 7) != 0)
{
std::ostringstream sstr;
sstr << "invalid frame amount: " << frame_amount;
BOOST_THROW_EXCEPTION(std::runtime_error(sstr.str()));
}
#endif
for(unsigned ii = 1; ((frame_amount + 1) > ii); ii += 7)
{
vec3 pos(static_cast<float>(data[ii + 0]),
static_cast<float>(data[ii + 1]),
static_cast<float>(data[ii + 2]));
quat rot(fixed_4_12_to_float(data[ii + 3]),
fixed_4_12_to_float(data[ii + 4]),
fixed_4_12_to_float(data[ii + 5]),
fixed_4_12_to_float(data[ii + 6]));
//std::cout << pos << " ; " << rot << std::endl;
m_bones.emplace_back(pos * scale, rot);
}
}
开发者ID:faemiyah,项目名称:faemiyah-demoscene_2016-08_80k-intro_my_mistress_the_leviathan,代码行数:34,代码来源:verbatim_animation_frame.hpp
示例2: newAnimationState
/// Get a fresh animation state.
///
/// Data contained in the returned animation state is undefined, but not invalid.
///
/// \return Animation state.
AnimationState& newAnimationState()
{
unsigned ret = m_current_animation_state++;
if(m_animation_states.size() <= ret)
{
m_animation_states.emplace_back();
}
return m_animation_states[ret];
}
开发者ID:faemiyah,项目名称:faemiyah-demoscene_2016-08_80k-intro_my_mistress_the_leviathan,代码行数:16,代码来源:verbatim_state.hpp