const matrix3x4_t & C_EnvelopeFX::RenderableToWorldTransform() { static matrix3x4_t mat; SetIdentityMatrix( mat ); PositionMatrix( GetRenderOrigin(), mat ); return mat; }
void C_BaseViewModel::FormatViewModelAttachment( int nAttachment, matrix3x4_t &attachmentToWorld ) { Vector vecOrigin; MatrixPosition( attachmentToWorld, vecOrigin ); ::FormatViewModelAttachment( vecOrigin, false ); PositionMatrix( vecOrigin, attachmentToWorld ); }
const matrix3x4_t & CParticleEffectBinding::RenderableToWorldTransform() { static matrix3x4_t mat; SetIdentityMatrix( mat ); PositionMatrix( GetRenderOrigin(), mat ); return mat; }
const matrix3x4_t& CBulletManager::CBullet::RenderableToWorldTransform() { static matrix3x4_t mat; SetIdentityMatrix( mat ); PositionMatrix( GetRenderOrigin(), mat ); return mat; }
void C_BaseViewModel::FormatViewModelAttachment( int nAttachment, matrix3x4_t &attachmentToWorld ) { C_BasePlayer *pPlayer = ToBasePlayer( GetOwner() ); Vector vecOrigin; MatrixPosition( attachmentToWorld, vecOrigin ); ::FormatViewModelAttachment( pPlayer, vecOrigin, false ); PositionMatrix( vecOrigin, attachmentToWorld ); }
bool C_WalkerStrider::GetAttachment( int iAttachment, matrix3x4_t &attachmentToWorld ) { // // // This is a TOTAL hack, but we don't have any nodes that work well at all for mounted guns. // // studiohdr_t *pStudioHdr = GetModelPtr( ); if ( !pStudioHdr || iAttachment < 1 || iAttachment > pStudioHdr->numattachments ) { return false; } Vector vLocalPos( 0, 0, 0 ); mstudioattachment_t *pAttachment = pStudioHdr->pAttachment( iAttachment-1 ); if ( stricmp( pAttachment->pszName(), "build_point_left_gun" ) == 0 ) { vLocalPos.y = sideDist; } else if ( stricmp( pAttachment->pszName(), "build_point_right_gun" ) == 0 ) { vLocalPos.y = -sideDist; } else if ( stricmp( pAttachment->pszName(), "ThirdPersonCameraOrigin" ) == 0 ) { } else { // Ok, it's not one of our magical attachments. Use the regular attachment setup stuff. return BaseClass::GetAttachment( iAttachment, attachmentToWorld ); } if ( m_bCrouched ) { vLocalPos.z += downDist; } // Now build the output matrix. matrix3x4_t localMatrix; SetIdentityMatrix( localMatrix ); PositionMatrix( vLocalPos, localMatrix ); ConcatTransforms( EntityToWorldTransform(), localMatrix, attachmentToWorld ); return true; }