diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /hammer/axes2.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'hammer/axes2.h')
| -rw-r--r-- | hammer/axes2.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/hammer/axes2.h b/hammer/axes2.h new file mode 100644 index 0000000..6ee20a5 --- /dev/null +++ b/hammer/axes2.h @@ -0,0 +1,40 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Defines a base set of services for operations in an orthorgraphic +// projection. This is used as a base class for the 2D view and for +// the tools that work in the 2D views. +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef AXES2_H +#define AXES2_H +#ifdef _WIN32 +#pragma once +#endif + +#include "hammer_mathlib.h" + +class Axes2 +{ +public: + Axes2() + { + bInvertHorz = bInvertVert = false; + axHorz = AXIS_X; + axVert = AXIS_Y; + axThird = AXIS_Z; + } + + void SetAxes(int h, bool bInvertH, int v, bool bInvertV); + void SetAxes(Axes2 &axes); + + bool bInvertHorz; // Whether the horizontal axis is inverted. + bool bInvertVert; // Whether the vertical axis is inverted. + + int axHorz; // Index of the horizontal axis (x=0, y=1, z=2) + int axVert; // Index of the vertical axis (x=0, y=1, z=2) + int axThird; // Index of the "out of the screen" axis (x=0, y=1, z=2) +}; + +#endif // AXES2_H |