mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
maintenance: settings item refactoring, include dependencies fixes
This commit is contained in:
9
Spring.h
9
Spring.h
@@ -10,6 +10,8 @@ http://mozilla.org/MPL/2.0/.
|
||||
#ifndef ParticlesH
|
||||
#define ParticlesH
|
||||
|
||||
#include "dumb3d.h"
|
||||
|
||||
#define STATIC_THRESHOLD 0.17f
|
||||
// efine STATIC_THRESHOLD 0.03f
|
||||
const double m_Kd = 0.02f; // DAMPING FACTOR
|
||||
@@ -20,9 +22,6 @@ const double m_Ksd = 0.1f; // SPRING DAMPING CONSTANT
|
||||
const double m_Csf = 0.9f; // Default Static Friction
|
||||
const double m_Ckf = 0.7f; // Default Kinetic Friction
|
||||
|
||||
#include "dumb3d.h"
|
||||
using namespace Math3D;
|
||||
|
||||
class TSpring
|
||||
{
|
||||
public:
|
||||
@@ -31,9 +30,9 @@ class TSpring
|
||||
// void Init(TParticnp1, TParticle *np2, double nKs= 0.5f, double nKd= 0.002f,
|
||||
// double nrestLen= -1.0f);
|
||||
void Init(double nrestLen, double nKs = 0.5f, double nKd = 0.002f);
|
||||
Math3D::vector3 ComputateForces(vector3 const &pPosition1, vector3 const &pPosition2);
|
||||
Math3D::vector3 ComputateForces( Math3D::vector3 const &pPosition1, Math3D::vector3 const &pPosition2);
|
||||
void Render();
|
||||
vector3 vForce1, vForce2;
|
||||
Math3D::vector3 vForce1, vForce2;
|
||||
double restLen; // LENGTH OF SPRING AT REST
|
||||
double Ks; // SPRING CONSTANT
|
||||
double Kd; // SPRING DAMPING
|
||||
|
||||
Reference in New Issue
Block a user