-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathParticleContact.cpp
75 lines (59 loc) · 1.45 KB
/
ParticleContact.cpp
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* ParticleContact.cpp
*
* Created on: 03/04/2016
* Author: ubuntu
*/
#include "ParticleContact.h"
namespace MyBilliards {
ParticleContact::ParticleContact() {
// TODO Auto-generated constructor stub
}
ParticleContact::ParticleContact(particle *p1, particle *p2,vector3 contactNormal,double interpenetration)
{
/*
this->*p1 = p1;
this->*p2 = p2;
this->contactNormal = contactNormal;
this->interpenetration=interpenetration;
*/
}
void ParticleContact::ResolveCollision()
{
//aplica canvi velocitat a la bola....( p1)
// tota la informacio ja hi es a particle contact.
/*
this->*p1 = p1;
this->*p2 = p2;
this->contactNormal = contactNormal;
this->interpenetration=interpenetration;
*/
}
const vector3& ParticleContact::getContactNormal() const {
return contactNormal;
}
void ParticleContact::setContactNormal(const vector3& contactNormal) {
this->contactNormal = contactNormal;
}
double ParticleContact::getInterpenetration() const {
return interpenetration;
}
void ParticleContact::setInterpenetration(double interpenetration) {
this->interpenetration = interpenetration;
}
const particle*& ParticleContact::getP1() const {
return p1;
}
void ParticleContact::setP1(const particle*& p1) {
this->p1 = p1;
}
const particle*& ParticleContact::getP2() const {
return p2;
}
void ParticleContact::setP2(const particle*& p2) {
this->p2 = p2;
}
ParticleContact::~ParticleContact() {
// TODO Auto-generated destructor stub
}
} /* namespace MyBilliards */