Added preliminary getRotationPeriod method.
parent
2db73e9315
commit
b36c11b69e
10
src/star.cpp
10
src/star.cpp
|
@ -129,6 +129,16 @@ float Star::getTemperature() const
|
|||
}
|
||||
|
||||
|
||||
float Star::getRotationPeriod() const
|
||||
{
|
||||
// For now, just return the equatorial rotation period of the sun;
|
||||
// because the sun is a gaseous body, it exhibits differential rotation,
|
||||
// and the poles rotate considerably slower.
|
||||
// TODO: Compute a number based on the luminosity and class of the star
|
||||
return 25.4f;
|
||||
}
|
||||
|
||||
|
||||
void Star::setCatalogNumber(uint32 n)
|
||||
{
|
||||
catalogNumber = n;
|
||||
|
|
|
@ -27,6 +27,7 @@ public:
|
|||
inline float getLuminosity() const;
|
||||
float getRadius() const;
|
||||
float getTemperature() const;
|
||||
float getRotationPeriod() const;
|
||||
|
||||
void setCatalogNumber(uint32);
|
||||
void setPosition(float, float, float);
|
||||
|
|
Loading…
Reference in New Issue