void CHelicopter::BoneMGunCallbackX(CBoneInstance *B) { CHelicopter * P = static_cast<CHelicopter*>(B->callback_param()); Fmatrix rX; rX.rotateX (P->m_cur_rot.x); B->mTransform.mulB_43 (rX); }
void __fastcall TUI_ControlAIMapNodeRotate::Move(TShiftState _Shift) { if (_Shift.Contains(ssLeft)){ float amount = -UI->m_DeltaCpH.x * UI->m_MouseSR; if( Tools->GetSettings(etfASnap) ) CHECK_SNAP(m_fRotateSnapAngle,amount,Tools->m_RotateSnapAngle); Fmatrix R; if (fis_zero(m_RotateVector.x)) R.rotateZ(amount); else R.rotateX(amount); AINodeVec& lst = ((ESceneAIMapTool*)parent_tool)->Nodes(); for(AINodeIt _F = lst.begin();_F!=lst.end();_F++) if((*_F)->flags.is(SAINode::flSelected)){ Fvector new_n; R.transform_dir(new_n,(*_F)->Plane.n); if (Fvector().set(0,1,0).dotproduct(new_n)>0.02f){ (*_F)->Plane.build((*_F)->Pos,new_n); } } } }
void CWeaponStatMgun::BoneCallbackX (CBoneInstance *B) { CWeaponStatMgun *P = static_cast<CWeaponStatMgun*>(B->callback_param()); Fmatrix rX; rX.rotateX (P->m_cur_x_rot); B->mTransform.mulB_43(rX); }
void CCarWeapon::BoneCallbackX (CBoneInstance *B) { CCarWeapon *P = static_cast<CCarWeapon*>(B->Callback_Param); Fmatrix rX; rX.rotateX (P->m_cur_x_rot); B->mTransform.mulB_43 (rX); }