Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
714 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "stdafx.h"
  8. #include "Axes2.h"
  9. #include "mathlib/vector.h"
  10. // memdbgon must be the last include file in a .cpp file!!!
  11. #include "tier0/memdbgon.h"
  12. void Axes2::SetAxes(int h, bool bInvertH, int v, bool bInvertV)
  13. {
  14. bInvertHorz = bInvertH;
  15. bInvertVert = bInvertV;
  16. axHorz = h;
  17. axVert = v;
  18. if(h != AXIS_X && v != AXIS_X)
  19. axThird = AXIS_X;
  20. if(h != AXIS_Y && v != AXIS_Y)
  21. axThird = AXIS_Y;
  22. if(h != AXIS_Z && v != AXIS_Z)
  23. axThird = AXIS_Z;
  24. }
  25. void Axes2::SetAxes(Axes2 &axes)
  26. {
  27. *this = axes;
  28. }