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.

49 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef PHYSICS_FLUID_H
  8. #define PHYSICS_FLUID_H
  9. #pragma once
  10. #include "vphysics_interface.h"
  11. class IVP_Compact_Surface;
  12. class IVP_Environment;
  13. class IVP_Listener_Phantom;
  14. class CBuoyancyAttacher;
  15. class IVP_Liquid_Surface_Descriptor;
  16. class CPhysicsObject;
  17. class CPhysicsObject;
  18. class CPhysicsFluidController : public IPhysicsFluidController
  19. {
  20. public:
  21. CPhysicsFluidController( CBuoyancyAttacher *pBuoy, IVP_Liquid_Surface_Descriptor *pLiquid, CPhysicsObject *pObject, int nContents );
  22. ~CPhysicsFluidController( void );
  23. virtual void SetGameData( void *pGameData );
  24. virtual void *GetGameData( void ) const;
  25. virtual void GetSurfacePlane( Vector *pNormal, float *pDist ) const;
  26. virtual float GetDensity() const;
  27. virtual void WakeAllSleepingObjects();
  28. virtual int GetContents() const;
  29. class IVP_Real_Object *GetIVPObject();
  30. const class IVP_Real_Object *GetIVPObject() const;
  31. private:
  32. CBuoyancyAttacher *m_pBuoyancy;
  33. IVP_Liquid_Surface_Descriptor *m_pLiquidSurface;
  34. CPhysicsObject *m_pObject;
  35. int m_nContents;
  36. void *m_pGameData;
  37. };
  38. extern CPhysicsFluidController *CreateFluidController( IVP_Environment *pEnvironment, CPhysicsObject *pFluidObject, fluidparams_t *pParams );
  39. #endif // PHYSICS_FLUID_H