aboutsummaryrefslogtreecommitdiff
path: root/mp/src/mathlib/bumpvects.cpp
diff options
context:
space:
mode:
authorJørgen P. Tjernø <[email protected]>2013-12-02 19:31:46 -0800
committerJørgen P. Tjernø <[email protected]>2013-12-02 19:46:31 -0800
commitf56bb35301836e56582a575a75864392a0177875 (patch)
treede61ddd39de3e7df52759711950b4c288592f0dc /mp/src/mathlib/bumpvects.cpp
parentMark some more files as text. (diff)
downloadsource-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz
source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip
Fix line endings. WHAMMY.
Diffstat (limited to 'mp/src/mathlib/bumpvects.cpp')
-rw-r--r--mp/src/mathlib/bumpvects.cpp136
1 files changed, 68 insertions, 68 deletions
diff --git a/mp/src/mathlib/bumpvects.cpp b/mp/src/mathlib/bumpvects.cpp
index 5d1d278a..5edbe4d4 100644
--- a/mp/src/mathlib/bumpvects.cpp
+++ b/mp/src/mathlib/bumpvects.cpp
@@ -1,69 +1,69 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $Workfile: $
-// $Date: $
-//
-//-----------------------------------------------------------------------------
-// $Log: $
-//
-// $NoKeywords: $
-//=============================================================================//
-
-#if !defined(_STATIC_LINKED) || defined(_SHARED_LIB)
-
-
-#ifdef QUIVER
-#include "r_local.h"
-#endif
-#include "mathlib/bumpvects.h"
-#include "mathlib/vector.h"
-#include <assert.h>
-
-// memdbgon must be the last include file in a .cpp file!!!
-#include "tier0/memdbgon.h"
-
-// z is coming out of the face.
-
-void GetBumpNormals( const Vector& sVect, const Vector& tVect, const Vector& flatNormal,
- const Vector& phongNormal, Vector bumpNormals[NUM_BUMP_VECTS] )
-{
- Vector tmpNormal;
- bool leftHanded;
- int i;
-
- assert( NUM_BUMP_VECTS == 3 );
-
- // Are we left or right handed?
- CrossProduct( sVect, tVect, tmpNormal );
- if( DotProduct( flatNormal, tmpNormal ) < 0.0f )
- {
- leftHanded = true;
- }
- else
- {
- leftHanded = false;
- }
-
- // Build a basis for the face around the phong normal
- matrix3x4_t smoothBasis;
- CrossProduct( phongNormal.Base(), sVect.Base(), smoothBasis[1] );
- VectorNormalize( smoothBasis[1] );
- CrossProduct( smoothBasis[1], phongNormal.Base(), smoothBasis[0] );
- VectorNormalize( smoothBasis[0] );
- VectorCopy( phongNormal.Base(), smoothBasis[2] );
-
- if( leftHanded )
- {
- VectorNegate( smoothBasis[1] );
- }
-
- // move the g_localBumpBasis into world space to create bumpNormals
- for( i = 0; i < 3; i++ )
- {
- VectorIRotate( g_localBumpBasis[i], smoothBasis, bumpNormals[i] );
- }
-}
-
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $Workfile: $
+// $Date: $
+//
+//-----------------------------------------------------------------------------
+// $Log: $
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#if !defined(_STATIC_LINKED) || defined(_SHARED_LIB)
+
+
+#ifdef QUIVER
+#include "r_local.h"
+#endif
+#include "mathlib/bumpvects.h"
+#include "mathlib/vector.h"
+#include <assert.h>
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include "tier0/memdbgon.h"
+
+// z is coming out of the face.
+
+void GetBumpNormals( const Vector& sVect, const Vector& tVect, const Vector& flatNormal,
+ const Vector& phongNormal, Vector bumpNormals[NUM_BUMP_VECTS] )
+{
+ Vector tmpNormal;
+ bool leftHanded;
+ int i;
+
+ assert( NUM_BUMP_VECTS == 3 );
+
+ // Are we left or right handed?
+ CrossProduct( sVect, tVect, tmpNormal );
+ if( DotProduct( flatNormal, tmpNormal ) < 0.0f )
+ {
+ leftHanded = true;
+ }
+ else
+ {
+ leftHanded = false;
+ }
+
+ // Build a basis for the face around the phong normal
+ matrix3x4_t smoothBasis;
+ CrossProduct( phongNormal.Base(), sVect.Base(), smoothBasis[1] );
+ VectorNormalize( smoothBasis[1] );
+ CrossProduct( smoothBasis[1], phongNormal.Base(), smoothBasis[0] );
+ VectorNormalize( smoothBasis[0] );
+ VectorCopy( phongNormal.Base(), smoothBasis[2] );
+
+ if( leftHanded )
+ {
+ VectorNegate( smoothBasis[1] );
+ }
+
+ // move the g_localBumpBasis into world space to create bumpNormals
+ for( i = 0; i < 3; i++ )
+ {
+ VectorIRotate( g_localBumpBasis[i], smoothBasis, bumpNormals[i] );
+ }
+}
+
#endif // !_STATIC_LINKED || _SHARED_LIB \ No newline at end of file