forked from brucedjones/pyck
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpack.h
More file actions
63 lines (50 loc) · 1.39 KB
/
pack.h
File metadata and controls
63 lines (50 loc) · 1.39 KB
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
#ifndef PACK_H
#define PACK_H
#include <vector>
#include "shape.h"
/**
* The pack to be packed with particles.
*/
class Pack {
public:
// Methods
/**
* Pack Constructor
*/
Pack();
~Pack();
/**
* Add a shape to the Pack
* @param shape Shape to be mapped
*/
void AddShape(Shape *shape);
/**
* Pack all added shapes and generate positions and states
*/
void MapShapes();
/**
* Get number of particles
* @return the number of particles in the model
*/
long GetNumParticles();
/**
* Get number of particles for a given state
* @param state Integer representing the state of the created particles
* @return The number of particles with corresponding input state
*/
long GetNumParticlesByState(int state);
double * GetPositions();
double *positions; /**< Array containing all packed particle positions */
int *states; /**< Array containing all packed particle states */
long numParticles; /**< The number of particles packed in this pack */
int dim; /**< Dimensionality of pack (2D or 3D) */
private:
// Methods
/**
* Map a shape to the pack
* @param shape Shape to be mapped
*/
virtual void MapShape(Shape *shape)=0;
std::vector<Shape*> shapes; /**< Vector of integer fields */
};
#endif