1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2026-10-10 03:43:06 +08:00

SDK sync.

This commit is contained in:
Nicholas Hastings
2014-02-28 14:08:09 -05:00
parent 7cc1bd2f96
commit e2781a0000
558 changed files with 39082 additions and 1463 deletions
+21 -1
View File
@@ -509,7 +509,7 @@ bool VMatrix::IsRotationMatrix() const
FloatMakePositive( v2.Dot(v3) ) < 0.01f;
}
void VMatrix::SetupMatrixOrgAngles( const Vector &origin, const QAngle &vAngles )
static void SetupMatrixAnglesInternal( vec_t m[4][4], const QAngle & vAngles )
{
float sr, sp, sy, cr, cp, cy;
@@ -530,6 +530,11 @@ void VMatrix::SetupMatrixOrgAngles( const Vector &origin, const QAngle &vAngles
m[0][3] = 0.f;
m[1][3] = 0.f;
m[2][3] = 0.f;
}
void VMatrix::SetupMatrixOrgAngles( const Vector &origin, const QAngle &vAngles )
{
SetupMatrixAnglesInternal( m, vAngles );
// Add translation
m[0][3] = origin.x;
@@ -542,6 +547,21 @@ void VMatrix::SetupMatrixOrgAngles( const Vector &origin, const QAngle &vAngles
}
void VMatrix::SetupMatrixAngles( const QAngle &vAngles )
{
SetupMatrixAnglesInternal( m, vAngles );
// Zero everything else
m[0][3] = 0.0f;
m[1][3] = 0.0f;
m[2][3] = 0.0f;
m[3][0] = 0.0f;
m[3][1] = 0.0f;
m[3][2] = 0.0f;
m[3][3] = 1.0f;
}
//-----------------------------------------------------------------------------
// Sets matrix to identity
//-----------------------------------------------------------------------------