本文整理汇总了C++中Fmatrix::getHPB方法的典型用法代码示例。如果您正苦于以下问题:C++ Fmatrix::getHPB方法的具体用法?C++ Fmatrix::getHPB怎么用?C++ Fmatrix::getHPB使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fmatrix
的用法示例。
在下文中一共展示了Fmatrix::getHPB方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StartParticles
void CParticlesPlayer::StartParticles(const shared_str& particles_name, u16 bone_num, const Fmatrix& xform, u16 sender_id, int life_time, bool auto_stop)
{
VERIFY(fis_zero(xform.c.magnitude()));
R_ASSERT(*particles_name);
CObject* object = m_self_object;
VERIFY(object);
SBoneInfo* pBoneInfo = get_nearest_bone_info(smart_cast<CKinematics*>(object->Visual()),bone_num);
if(!pBoneInfo) return;
SParticlesInfo &particles_info =*pBoneInfo->AppendParticles(object,particles_name);
particles_info.sender_id = sender_id;
particles_info.life_time=auto_stop ? life_time : u32(-1);
xform.getHPB(particles_info.angles);
Fmatrix m;
m.setHPB(particles_info.angles.x,particles_info.angles.y,particles_info.angles.z);
GetBonePos(object,pBoneInfo->index,pBoneInfo->offset,m.c);
particles_info.ps->UpdateParent(m,zero_vel);
if(!particles_info.ps->IsPlaying())
particles_info.ps->Play ();
m_bActiveBones = true;
}
示例2: calc_cam_diff_rot
void calc_cam_diff_rot(Fmatrix item_transform, Fvector diff, Fvector& res)
{
Fmatrix cam_m;
cam_m.i.set (Device.vCameraRight);
cam_m.j.set (Device.vCameraTop);
cam_m.k.set (Device.vCameraDirection);
cam_m.c.set (Device.vCameraPosition);
Fmatrix R;
R.identity ();
if(!fis_zero(diff.x))
{
R.rotation(cam_m.i,diff.x);
}else
if(!fis_zero(diff.y))
{
R.rotation(cam_m.j,diff.y);
}else
if(!fis_zero(diff.z))
{
R.rotation(cam_m.k,diff.z);
};
Fmatrix item_transform_i;
item_transform_i.invert (item_transform);
R.mulB_43(item_transform);
R.mulA_43(item_transform_i);
R.getHPB (res);
res.mul (180.0f/PI);
}