-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPgenerator.h
87 lines (68 loc) · 2.06 KB
/
Pgenerator.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
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
76
77
78
79
80
81
82
83
84
85
86
87
/********************************************************
Pgenerator.h
Header File for the particle generator class
Gina Guerrero - Fall 2013
********************************************************/
#ifndef _PGENERATOR_H_
#define _PGENERATOR_H_
#include "Model.h"
#include "gauss.h"
#include "time.h"
#define POINT 0
#define CIRCLE 1
#define SPHERE 2
#define LINE 3 // augh...I'm overwhelming myself
#define PLANE 4
class Pgenerator {
private:
int Type;
Model Shape;
Vector3d Center;
Vector3d Velocity; // could be moving...but uh, for now, let's not move it.
double Radius; // if it's a sphere OR circle
int Orientation;
Vector3d P0; // if its a plane
Vector3d P1; // if its a plane
Vector3d P2; // if its a plane
Vector3d P3; // if its a plane
int internalcnt;
// i need a base for the stuff...
double Mean;
double StdDev;
double BaseMass;
double MStdDev;
Vector4d BaseColor;
double CStdDev;
double BaseCoefff;
double BaseCoeffr;
// because I'm too lazy to create a struct? is the overhead going to be that bad?
Vector3d GeneratedV0;
Vector3d GeneratedC0;
Vector4d GeneratedColor;
double GeneratedMass;
int PNum;
public:
Pgenerator();
// setters
void SetBaseAttr(int type, double bs, double sd, double bm, double msd, Vector4d bc, double csd, double pnum, double coefff, double coeffr);
void SetCenterRadius(Vector3d center, double radius);
void SetPlanePts(Vector3d p0, Vector3d p1, Vector3d p2, Vector3d p3);
void SetVelocity(Vector3d v);
void SetModel(int orientation = 2);
void SetBaseColor(Vector4d newbc);
// generate random velocity, center, color, mass
void GenerateAttr(int spdir);
Vector4d GenerateColor(Vector4d c);
void MoveGenerator(double timestep);
// technically getters
Vector3d GenV0();
Vector3d GenC0();
Vector4d GenCol();
double GenMass();
int GetPNum();
double GetCoefff();
double GetCoeffr();
// printing
void PrintGen();
};
#endif