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.

53 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "stdafx.h"
  8. #include "Box3D.h"
  9. #include "MapDefs.h" // for COORD_NOTINIT
  10. #include "MapPoint.h"
  11. #include "hammer_mathlib.h"
  12. // memdbgon must be the last include file in a .cpp file!!!
  13. #include <tier0/memdbgon.h>
  14. //-----------------------------------------------------------------------------
  15. // Purpose: Constructor. Initializes the origin point to all zeros.
  16. //-----------------------------------------------------------------------------
  17. CMapPoint::CMapPoint(void)
  18. {
  19. m_Origin.Init();
  20. }
  21. //-----------------------------------------------------------------------------
  22. // Purpose: Returns this point's X, Y, Z coordinates.
  23. //-----------------------------------------------------------------------------
  24. void CMapPoint::GetOrigin(Vector &Origin)
  25. {
  26. Origin = m_Origin;
  27. }
  28. //-----------------------------------------------------------------------------
  29. // Purpose: Sets this point's X, Y, Z coordinates.
  30. //-----------------------------------------------------------------------------
  31. void CMapPoint::SetOrigin(Vector &Origin)
  32. {
  33. m_Origin = Origin;
  34. }
  35. //-----------------------------------------------------------------------------
  36. // Purpose:
  37. // Input : pTransBox -
  38. //-----------------------------------------------------------------------------
  39. void CMapPoint::DoTransform(const VMatrix &matrix)
  40. {
  41. TransformPoint( matrix, m_Origin );
  42. }