本文整理汇总了C++中xr_vector::front方法的典型用法代码示例。如果您正苦于以下问题:C++ xr_vector::front方法的具体用法?C++ xr_vector::front怎么用?C++ xr_vector::front使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xr_vector
的用法示例。
在下文中一共展示了xr_vector::front方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void CSoundRender_TargetA::fill_block (ALuint BufferID)
{
R_ASSERT (m_pEmitter);
m_pEmitter->fill_block(&g_target_temp_data.front(),buf_block);
ALuint format = (m_pEmitter->source()->m_wformat.nChannels==1)?AL_FORMAT_MONO16:AL_FORMAT_STEREO16;
A_CHK (alBufferData(BufferID, format, &g_target_temp_data.front(), buf_block, m_pEmitter->source()->m_wformat.nSamplesPerSec));
}
示例2: todo
void CSoundRender_TargetA::fill_block (ALuint BufferID)
{
#pragma todo("check why pEmitter is NULL")
if (0==pEmitter) return;
pEmitter->fill_block(&g_target_temp_data.front(),buf_block);
ALuint format = (wfx.nChannels==1)?AL_FORMAT_MONO16:AL_FORMAT_STEREO16;
A_CHK (alBufferData(BufferID, format, &g_target_temp_data.front(), buf_block, wfx.nSamplesPerSec));
}
示例3: build_path
void CDetailPathManager::build_path(const xr_vector<u32> &level_path, u32 intermediate_index)
{
if (valid(m_start_position) && valid(m_dest_position)) {
switch (m_path_type) {
case eDetailPathTypeSmooth : {
build_smooth_path(level_path,intermediate_index);
break;
}
case eDetailPathTypeSmoothDodge : {
build_smooth_path(level_path,intermediate_index);
break;
}
case eDetailPathTypeSmoothCriteria : {
build_smooth_path(level_path,intermediate_index);
break;
}
default : NODEFAULT;
}
if (failed()) {
Msg ("! DetailPathManager has failed : from [%f,%f,%f] to [%f,%f,%f]", VPUSH(ai().level_graph().vertex_position(level_path.front())), VPUSH(ai().level_graph().vertex_position(level_path.back())));
#ifdef DEBUG
Msg ("! DetailPathManager has failed for object %s : from [%f,%f,%f] to [%f,%f,%f]", m_restricted_object ? *m_restricted_object->object().cName() : "unknown", VPUSH(ai().level_graph().vertex_position(level_path.front())), VPUSH(ai().level_graph().vertex_position(level_path.back())));
Msg ("List of available velocities :");
xr_vector<STravelParamsIndex>::const_iterator I = m_start_params.begin();
xr_vector<STravelParamsIndex>::const_iterator E = m_start_params.end();
for ( ; I != E; ++I)
Msg ("[%d] : [%f][%f]",(*I).index,(*I).linear_velocity,(*I).angular_velocity);
// for (;;)
// build_smooth_path(level_path,intermediate_index);
#endif
}
if (valid()) {
m_actuality = true;
m_current_travel_point = 0;
m_time_path_built = Device.dwTimeGlobal;
}
}
}