diff options
| author | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
| commit | 39ed87570bdb2f86969d4be821c94b722dc71179 (patch) | |
| tree | abc53757f75f40c80278e87650ea92808274aa59 /sp/src/public/materialsystem/deformations.h | |
| download | source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip | |
First version of the SOurce SDK 2013
Diffstat (limited to 'sp/src/public/materialsystem/deformations.h')
| -rw-r--r-- | sp/src/public/materialsystem/deformations.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/sp/src/public/materialsystem/deformations.h b/sp/src/public/materialsystem/deformations.h new file mode 100644 index 00000000..429ff297 --- /dev/null +++ b/sp/src/public/materialsystem/deformations.h @@ -0,0 +1,58 @@ +//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//===========================================================================//
+
+#ifndef DEFORMATIONS_H
+#define DEFORMATIONS_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "tier0/platform.h"
+
+// nonlinear transformations which may be applied to model vertices when rendering. must be powers of two
+enum DeformationType_t
+{
+ DEFORMATION_CLAMP_TO_BOX_IN_WORLDSPACE = 1, // minxyz.minsoftness / maxxyz.maxsoftness
+};
+
+
+struct DeformationBase_t // base class. don't use this
+{
+ DeformationType_t m_eType;
+};
+
+
+struct BoxDeformation_t : DeformationBase_t
+{
+ // don't change the layout without changing code in shaderapidx8!!!!
+ Vector m_SourceMins; // cube to clamp within
+ float m_flPad0;
+ Vector m_SourceMaxes;
+ float m_flPad1;
+
+ Vector m_ClampMins;
+ float m_flPad2;
+ Vector m_ClampMaxes;
+ float m_flPad3;
+
+ FORCEINLINE BoxDeformation_t( void )
+ {
+ m_eType = DEFORMATION_CLAMP_TO_BOX_IN_WORLDSPACE;
+ // invalid cube
+ m_SourceMins.Init( 0,0,0 );
+ m_SourceMaxes.Init( -1, -1, -1 );
+
+ // no clamp
+ m_ClampMins.Init( -FLT_MAX, -FLT_MAX, -FLT_MAX );
+ m_ClampMaxes.Init( FLT_MAX, FLT_MAX, FLT_MAX );
+ }
+
+};
+
+
+
+#endif
|