コード例 #1
0
ファイル: CClientEntity.cpp プロジェクト: qaisjp/green-candy
bool CClientEntity::SetMatrix ( const RwMatrix& matrix )
{
    CEntity * pEntity = GetGameEntity ();
    if ( pEntity )
    {
        pEntity->SetMatrix ( matrix );
        return true;
    }

    return false;
}
コード例 #2
0
bool CClientEntity::SetMatrix ( const CMatrix& matrix )
{
    CEntity * pEntity = GetGameEntity ();
    if ( pEntity )
    {
        pEntity->SetMatrix ( const_cast < CMatrix * > ( &matrix ) );
        return true;
    }

    return false;
}
コード例 #3
0
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;
}