forked from ruudandriessen/2imv15-assignment2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathParticle.h
38 lines (28 loc) · 796 Bytes
/
Particle.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include <Eigen/Dense>
#include "Object.h"
class RigidBody;
using namespace Eigen;
using namespace std;
class Particle:public Object
{
public:
Particle(const Vector3f & startPosition, float mass, int index, bool movable, bool rigid = false, bool cloth = false);
virtual ~Particle(void);
void reset();
void draw(bool drawVelocity, bool drawForce);
//from object
void handleSweep(bool start, vector<RigidBody *>* activeRigidBodies, vector<pair<RigidBody *, Particle *>> *range) override;
Vector3f startPos;
Vector3f force;
Vector3f velocity;
Vector3f position;
float pressure;
float density;
int index;
float mass;
bool movable;
bool rigid;
bool cloth;
Vector3f sForce, pForce, vForce;
};