1 #ifndef _PRESSURE_BODY_H
2 #define _PRESSURE_BODY_H
4 #include "SpringBody.h"
7 namespace JellyPhysics
{
9 class PressureBody
: public SpringBody
{
12 World
*w
, const ClosedShape
&s
, float mpp
,
13 float gasPressure
, float shapeK
, float shapeD
,
14 float edgeK
, float edgeD
,
15 const Vector2
&pos
, float angleInRadians
, const Vector2
&scale
,
17 ) : SpringBody(w
, s
, mpp
, shapeK
, shapeD
, edgeK
, edgeD
, pos
, angleInRadians
, scale
, kinematic
) {
18 mGasAmount
= gasPressure
;
19 mNormalList
= new Vector2
[mPointCount
];
24 void setGasPressure (float val
) { mGasAmount
= val
; }
25 float getGasPressure () const { return mGasAmount
; }
27 float getVolume() const { return mVolume
; }
29 void accumulateInternalForces ();