Counter Strike : Global Offensive Source Code
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.

44 lines
1.2 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #pragma once
  9. #ifndef CPLANE_H
  10. #define CPLANE_H
  11. //=========================================================
  12. // Plane
  13. //=========================================================
  14. class CPlane
  15. {
  16. public:
  17. CPlane ( void );
  18. //=========================================================
  19. // InitializePlane - Takes a normal for the plane and a
  20. // point on the plane and
  21. //=========================================================
  22. void InitializePlane ( const Vector &vecNormal, const Vector &vecPoint );
  23. //=========================================================
  24. // PointInFront - determines whether the given vector is
  25. // in front of the plane.
  26. //=========================================================
  27. bool PointInFront ( const Vector &vecPoint );
  28. //=========================================================
  29. // How far off the plane is this point?
  30. //=========================================================
  31. float PointDist( const Vector &vecPoint );
  32. private:
  33. Vector m_vecNormal;
  34. float m_flDist;
  35. bool m_fInitialized;
  36. };
  37. #endif //CPLANE_H