Space Comps
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
src
particle.h
1
#ifndef PARTICLE_H
2
#define PARTICLE_H
3
4
#include <iostream>
5
#include "position.h"
6
#include "collision.h"
7
#include "node.h"
8
9
class
Collision
;
10
class
Node
;
11
12
class
Particle
13
{
14
public
:
15
Particle
(
int
id
,
Position
* startPos, std::valarray<double> startVel,
double
radiusIn,
double
massIn);
16
17
~
Particle
();
18
19
int
getID();
20
21
double
getXvel();
22
double
getYvel();
23
double
getZvel();
24
double
getXpos();
25
double
getYpos();
26
double
getZpos();
27
double
getMass();
28
double
getRadius();
29
Position
* getCurPos();
30
31
Node
* getHead();
32
Node
* getTail();
33
34
void
setHead(
Node
* n);
35
void
setTail(
Node
* n);
36
void
setRadius(
double
r);
37
void
setMass(
double
m);
38
39
std::valarray<double> getVel();
40
void
updateVel(
double
x,
double
y,
double
z);
41
void
updateCurPos(
Position
* newPos);
42
43
std::valarray<double> getAcceleration();
44
void
updateAcceleration(std::valarray<double> newA);
45
46
void
printAll();
47
48
49
private
:
50
int
id;
51
double
radius;
52
double
mass;
53
54
Node
* head;
55
Node
* tail;
56
57
std::valarray<double> vel;
58
std::valarray<double> acceleration;
59
Position
* curPos;
60
};
61
62
#endif // PARTICLE_H
Node
The Node class contains a Position for a Particle in the MultiQueue.
Definition:
node.h:15
Position
Definition:
position.h:8
Particle
Definition:
particle.h:12
Collision
Definition:
collision.h:7
Generated on Sun Feb 23 2014 12:52:24 for Space Comps by
1.8.6