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.

40 lines
2.1 KiB

  1. //========= Copyright (c) 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef PORTAL_PLACEMENT_H
  7. #define PORTAL_PLACEMENT_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. struct CPortalCornerFitData;
  12. #include "portal_shareddefs.h"
  13. #include "CegClientWrapper.h"
  14. #if defined( CLIENT_DLL )
  15. class C_Prop_Portal;
  16. typedef C_Prop_Portal CProp_Portal;
  17. #else
  18. class CProp_Portal;
  19. #endif
  20. bool FitPortalOnSurface( const CProp_Portal *pIgnorePortal, Vector &vOrigin, const Vector &vForward, const Vector &vRight,
  21. const Vector &vTopEdge, const Vector &vBottomEdge, const Vector &vRightEdge, const Vector &vLeftEdge,
  22. PortalPlacedBy_t ePlacedBy, ITraceFilter *pTraceFilterPortalShot,
  23. float fHalfWidth, float fHalfHeight,
  24. int iRecursions = 0, const CPortalCornerFitData *pPortalCornerFitData = 0, const int *p_piIntersectionIndex = 0, const int *piIntersectionCount = 0 );
  25. bool IsPortalIntersectingNoPortalVolume( const Vector &vOrigin, const QAngle &qAngles, const Vector &vForward, float fHalfWidth, float fHalfHeight );
  26. PortalPlacementResult_t IsPortalOverlappingOtherPortals( const CProp_Portal *pIgnorePortal, const Vector &vOrigin, const QAngle &qAngles, float fHalfWidth, float fHalfHeight, bool bFizzleAll = false, bool bFizzlePartnerPortals = false );
  27. PortalPlacementResult_t VerifyPortalPlacement( const CProp_Portal *pIgnorePortal, Vector &vOrigin, QAngle &qAngles, float fHalfWidth, float fHalfHeight, PortalPlacedBy_t ePlacedBy );
  28. PortalPlacementResult_t VerifyPortalPlacementAndFizzleBlockingPortals( const CProp_Portal *pIgnorePortal, Vector &vOrigin, QAngle &qAngles, float fHalfWidth, float fHalfHeight, PortalPlacedBy_t ePlacedBy );
  29. bool PortalPlacementSucceeded( PortalPlacementResult_t eResult );
  30. bool IsNoPortalMaterial( const trace_t &tr );
  31. PortalSurfaceType_t PortalSurfaceType( const trace_t& tr );
  32. bool IsOnPortalPaint( const trace_t &tr );
  33. void InitSurfNoPortalFlag();
  34. void InitPortalPaintPowerValue();
  35. #endif // PORTAL_PLACEMENT_H