Added preliminary getRotationPeriod method.

pull/3/head
Chris Laurel 2001-04-09 21:49:02 +00:00
parent 2db73e9315
commit b36c11b69e
2 changed files with 11 additions and 0 deletions

View File

@ -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;

View File

@ -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);