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.

57 lines
2.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Deals with singleton
  4. //
  5. // $Revision: $
  6. // $NoKeywords: $
  7. //=============================================================================//
  8. #if !defined( DETAILOBJECTSYSTEM_H )
  9. #define DETAILOBJECTSYSTEM_H
  10. #ifdef _WIN32
  11. #pragma once
  12. #endif
  13. #include "igamesystem.h"
  14. #include "icliententityinternal.h"
  15. #include "engine/ivmodelrender.h"
  16. #include "mathlib/vector.h"
  17. #include "ivrenderview.h"
  18. struct model_t;
  19. //-----------------------------------------------------------------------------
  20. // Responsible for managing detail objects
  21. //-----------------------------------------------------------------------------
  22. abstract_class IDetailObjectSystem : public IGameSystem
  23. {
  24. public:
  25. // Gets a particular detail object
  26. virtual IClientRenderable* GetDetailModel( int idx ) = 0;
  27. // Gets called each view
  28. virtual void BuildDetailObjectRenderLists( const Vector &vViewOrigin ) = 0;
  29. // Renders all opaque detail objects in a particular set of leaves
  30. virtual void RenderOpaqueDetailObjects( int nLeafCount, LeafIndex_t *pLeafList ) = 0;
  31. // Call this before rendering translucent detail objects
  32. virtual void BeginTranslucentDetailRendering( ) = 0;
  33. // Renders all translucent detail objects in a particular set of leaves
  34. virtual void RenderTranslucentDetailObjects( const Vector &viewOrigin, const Vector &viewForward, const Vector &viewRight, const Vector &viewUp, int nLeafCount, LeafIndex_t *pLeafList ) =0;
  35. // Renders all translucent detail objects in a particular leaf up to a particular point
  36. virtual void RenderTranslucentDetailObjectsInLeaf( const Vector &viewOrigin, const Vector &viewForward, const Vector &viewRight, const Vector &viewUp, int nLeaf, const Vector *pVecClosestPoint ) = 0;
  37. };
  38. //-----------------------------------------------------------------------------
  39. // System for dealing with detail objects
  40. //-----------------------------------------------------------------------------
  41. IDetailObjectSystem* DetailObjectSystem();
  42. #endif // DETAILOBJECTSYSTEM_H