-
Notifications
You must be signed in to change notification settings - Fork 0
/
StarInfo.h
60 lines (53 loc) · 1.11 KB
/
StarInfo.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
#ifndef STAR_INFO_H_
#define STAR_INFO_H_
#include "StarInterface.h"
#include "StarCategory.h"
#include <string>
class StarInfo : public StarInterface {
public:
void GetPosition(double & vx, double & vy) {
vx = x;
vy = y;
}
float * GetColor() {
return color_ptr;
}
float GetRadius() {
return radius;
}
std::string & GetName() {
return cat_name;
}
int GetType() {
return cat_type;
}
float GetMass() {
return mass;
}
public:
StarInfo() {
cat_name = "none";
cat_type = sst_None;
color_ptr = color_;
seed = 0.0;
color_dev = 0.0;
radius = 0.0;
mass = 0.0;
for (int i=0; i<4; ++i) color_[i] = 1.0;
}
~StarInfo() {}
public:
// Basic parameters
std::string cat_name;
StarSequenceType cat_type;
double x, y;
float *color_ptr;
double seed;
// Parameters generated by seed.
float color_dev;
float radius;
float mass;
private:
float color_[4];
};
#endif // STAR_INFO_H_