本文整理汇总了C++中CEntity::SetMatrix方法的典型用法代码示例。如果您正苦于以下问题:C++ CEntity::SetMatrix方法的具体用法?C++ CEntity::SetMatrix怎么用?C++ CEntity::SetMatrix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEntity
的用法示例。
在下文中一共展示了CEntity::SetMatrix方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetMatrix
bool CClientEntity::SetMatrix ( const RwMatrix& matrix )
{
CEntity * pEntity = GetGameEntity ();
if ( pEntity )
{
pEntity->SetMatrix ( matrix );
return true;
}
return false;
}
示例2: SetMatrix
bool CClientEntity::SetMatrix ( const CMatrix& matrix )
{
CEntity * pEntity = GetGameEntity ();
if ( pEntity )
{
pEntity->SetMatrix ( const_cast < CMatrix * > ( &matrix ) );
return true;
}
return false;
}
示例3: SetMatrix
bool CClientEntity::SetMatrix ( const CMatrix& matrix )
{
CEntity * pEntity = GetGameEntity ();
if ( pEntity )
{
pEntity->SetMatrix ( const_cast < CMatrix * > ( &matrix ) );
return true;
}
// When streamed out
SetPosition ( matrix.vPos );
CVector vecRotation;
g_pMultiplayer->ConvertMatrixToEulerAngles ( matrix, vecRotation.fX, vecRotation.fY, vecRotation.fZ );
// Change rotation order so it works correctly for CClientObjects
// Any maybe other types that don't have a SetMatrix() override - Needs checking.
ConvertRadiansToDegreesNoWrap( vecRotation );
vecRotation = ConvertEulerRotationOrder( vecRotation, EULER_MINUS_ZYX, EULER_ZXY );
ConvertDegreesToRadiansNoWrap( vecRotation );
SetRotationRadians ( vecRotation );
return true;
}