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.

38 lines
1.3 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef PORTAL_DYNAMICMESHRENDERINGUTILS_H
  8. #define PORTAL_DYNAMICMESHRENDERINGUTILS_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "materialsystem/IMaterial.h"
  13. #include "mathlib/mathlib.h"
  14. #include "portalrender.h"
  15. struct PortalMeshPoint_t
  16. {
  17. Vector vWorldSpacePosition;
  18. Vector2D texCoord;
  19. };
  20. int ClipPolyToPlane_LerpTexCoords( PortalMeshPoint_t *inVerts, int vertCount, PortalMeshPoint_t *outVerts, const Vector& normal, float dist, float fOnPlaneEpsilon );
  21. void RenderPortalMeshConvexPolygon( PortalMeshPoint_t *pVerts, int iVertCount, const IMaterial *pMaterial, void *pBind );
  22. void Clip_And_Render_Convex_Polygon( PortalMeshPoint_t *pVerts, int iVertCount, const IMaterial *pMaterial, void *pBind );
  23. bool ClipPortalPolyToPlane( PortalMeshPoint_t *pInVerts, int nVertCount,
  24. PortalMeshPoint_t *pFrontVerts, int *pFrontVertCount,
  25. const Vector& normal, float flDist );
  26. void ProjectPortalPolyToPlane( PortalMeshPoint_t *pInVerts, int nVertCount,
  27. const Vector& normal, float flDist, const Vector &vCameraPos );
  28. #endif //#ifndef PORTAL_DYNAMICMESHRENDERINGUTILS_H