Remove particle forces if it gets destroyed
This commit is contained in:
@ -46,6 +46,9 @@ public:
|
||||
|
||||
//
|
||||
b3Force* GetNext();
|
||||
|
||||
//
|
||||
virtual bool HasParticle(const b3Particle* particle) const = 0;
|
||||
protected:
|
||||
friend class b3List2<b3Force>;
|
||||
friend class b3Cloth;
|
||||
|
@ -67,6 +67,8 @@ public:
|
||||
float32 GetDampingStiffness() const;
|
||||
|
||||
b3Vec3 GetActionForce() const;
|
||||
|
||||
bool HasParticle(const b3Particle* particle) const;
|
||||
private:
|
||||
friend class b3Force;
|
||||
friend class b3Cloth;
|
||||
@ -127,4 +129,9 @@ inline b3Vec3 b3SpringForce::GetActionForce() const
|
||||
return m_f;
|
||||
}
|
||||
|
||||
inline bool b3SpringForce::HasParticle(const b3Particle* particle) const
|
||||
{
|
||||
return m_p1 == particle || m_p2 == particle;
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user