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.

39 lines
1.1 KiB

#pragma once
#include "vjolt_internal_listeners.h"
class JoltPhysicsFluidController final : public IPhysicsFluidController, public IJoltObjectDestroyedListener, public IJoltPhysicsController
JoltPhysicsFluidController( JPH::PhysicsSystem *pPhysicsSystem, JoltPhysicsObject *pFluidObject, const fluidparams_t *pParams );
~JoltPhysicsFluidController() override;
void SetGameData( void *pGameData ) override;
void * GetGameData() const override;
void GetSurfacePlane( Vector *pNormal, float *pDist ) const override;
float GetDensity() const override;
void WakeAllSleepingObjects() override;
int GetContents() const override;
// IJoltObjectDestroyedListener
void OnJoltPhysicsObjectDestroyed( JoltPhysicsObject *pObject ) override;
// IJoltPhysicsController
void OnPreSimulate( float flDeltaTime ) override;
cplane_t GetSurfacePlane() const;
void ClearCachedObjectsInShape();
JPH::PhysicsSystem * m_pPhysicsSystem;
JoltPhysicsObject * m_pFluidObject;
std::vector<JoltPhysicsObject *> m_ObjectsInShape;
fluidparams_t m_Params;
cplane_t m_LocalPlane;