Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

StarDetails Class Reference

#include <star.h>

Collaboration diagram for StarDetails:

Collaboration graph
List of all members.

Public Types

enum  { KnowRadius = 0x1, KnowRotation = 0x2 }

Public Member Functions

void addKnowledge (uint32)
void computeOrbitalRadius ()
float getBolometricCorrection () const
Vec3f getEllipsoidSemiAxes () const
bool getKnowledge (uint32) const
uint32 getKnowledge () const
ResourceHandle getModel () const
OrbitgetOrbit () const
float getOrbitalRadius () const
StargetOrbitBarycenter () const
float getRadius () const
const RotationElementsgetRotationElements () const
const char * getSpectralType () const
float getTemperature () const
MultiResTexture getTexture () const
bool getVisibility () const
void setBolometricCorrection (float)
void setEllipsoidSemiAxes (const Vec3f &)
void setKnowledge (uint32)
void setModel (ResourceHandle)
void setOrbit (Orbit *)
void setOrbitalRadius (float)
void setOrbitBarycenter (Star *)
void setRadius (float)
void setRotationElements (const RotationElements &)
void setSpectralType (const std::string &)
void setTemperature (float)
void setTexture (const MultiResTexture &)
void setVisibility (bool)
 StarDetails ()

Static Public Member Functions

static StarDetailsCreateStandardStarType (const std::string &_specType, float _temperature, float _rotationPeriod)
static StarDetailsGetBarycenterDetails ()
static StarDetailsGetBlackHoleDetails ()
static StarDetailsGetNeutronStarDetails ()
static StarDetailsGetNormalStarDetails (StellarClass::SpectralClass specClass, unsigned int subclass, StellarClass::LuminosityClass lumClass)
static StarDetailsGetStarDetails (const StellarClass &)
static StarDetailsGetWhiteDwarfDetails (StellarClass::SpectralClass specClass, unsigned int subclass)
static void InitializeStarTextures ()

Static Public Attributes

static ResourceHandle starTexA = InvalidResource
static ResourceHandle starTexB = InvalidResource
static ResourceHandle starTexG = InvalidResource
static ResourceHandle starTexL = InvalidResource
static ResourceHandle starTexM = InvalidResource

Private Attributes

Starbarycenter
float bolometricCorrection
uint32 knowledge
ResourceHandle model
Orbitorbit
float orbitalRadius
float radius
RotationElements rotationElements
Vec3f semiAxes
char spectralType [8]
float temperature
MultiResTexture texture
bool visible

Member Enumeration Documentation

anonymous enum
 

Enumeration values:
KnowRadius 
KnowRotation 

Definition at line 62 of file star.h.

00063     {
00064         KnowRadius   = 0x1,
00065         KnowRotation = 0x2,
00066     };


Constructor & Destructor Documentation

StarDetails::StarDetails  ) 
 

Definition at line 710 of file star.cpp.

References InvalidResource, and spectralType.

Referenced by CreateStandardStarType().

00710                          :
00711     radius(0.0f),
00712     temperature(0.0f),
00713     bolometricCorrection(0.0f),
00714     knowledge(0u),
00715     visible(true),
00716     model(InvalidResource),
00717     orbit(NULL),
00718     orbitalRadius(0.0f),
00719     barycenter(NULL),
00720     semiAxes(1.0f, 1.0f, 1.0f)
00721 {
00722     spectralType[0] = '\0';
00723 }


Member Function Documentation

void StarDetails::addKnowledge uint32   ) 
 

Definition at line 756 of file star.cpp.

References knowledge.

Referenced by StarDatabase::createStar(), GetBarycenterDetails(), GetBlackHoleDetails(), and GetNeutronStarDetails().

00757 {
00758     knowledge |= _knowledge;
00759 }

void StarDetails::computeOrbitalRadius  ) 
 

Definition at line 808 of file star.cpp.

References barycenter, Orbit::getBoundingRadius(), Star::getOrbitalRadius(), astro::kilometersToLightYears(), orbit, and orbitalRadius.

Referenced by Star::computeOrbitalRadius(), setOrbit(), and setOrbitBarycenter().

00809 {
00810     if (orbit == NULL)
00811     {
00812         orbitalRadius = 0.0f;
00813     }
00814     else
00815     {
00816         orbitalRadius = (float) astro::kilometersToLightYears(orbit->getBoundingRadius());
00817         if (barycenter != NULL)
00818             orbitalRadius += barycenter->getOrbitalRadius();
00819     }
00820 }

StarDetails * StarDetails::CreateStandardStarType const std::string _specType,
float  _temperature,
float  _rotationPeriod
[static]
 

Definition at line 384 of file star.cpp.

References getRotationElements(), RotationElements::period, setRotationElements(), setSpectralType(), setTemperature(), and StarDetails().

Referenced by GetBarycenterDetails(), GetBlackHoleDetails(), GetNeutronStarDetails(), GetNormalStarDetails(), and GetWhiteDwarfDetails().

00388 {
00389     StarDetails* details = new StarDetails();
00390 
00391     details->setTemperature(_temperature);
00392     details->setSpectralType(specTypeName);
00393 
00394     RotationElements re = details->getRotationElements();
00395     re.period = _rotationPeriod;
00396     details->setRotationElements(re);
00397 
00398     return details;
00399 }

StarDetails * StarDetails::GetBarycenterDetails  )  [static]
 

Definition at line 684 of file star.cpp.

References addKnowledge(), barycenterDetails, CreateStandardStarType(), KnowRadius, setRadius(), and setVisibility().

Referenced by StarDatabase::createStar().

00685 {
00686 
00687     if (barycenterDetails == NULL)
00688     {
00689         barycenterDetails = CreateStandardStarType("Bary", 1.0f, 1.0f);
00690         barycenterDetails->setRadius(0.001f);
00691         barycenterDetails->addKnowledge(KnowRadius);
00692         barycenterDetails->setVisibility(false);
00693     }
00694 
00695     return barycenterDetails;
00696 }

StarDetails * StarDetails::GetBlackHoleDetails  )  [static]
 

Definition at line 665 of file star.cpp.

References addKnowledge(), blackHoleDetails, CreateStandardStarType(), KnowRadius, and setRadius().

Referenced by GetStarDetails().

00666 {
00667     if (blackHoleDetails == NULL)
00668     {
00669         // Default black hole parameters are based on a one solar mass
00670         // black hole.
00671         // The temperature is computed from the equation:
00672         //      T=h_bar c^3/(8 pi G k m)
00673         blackHoleDetails = CreateStandardStarType("X", 6.15e-8f,
00674                                                   1.0f / 86400.0f);
00675         blackHoleDetails->setRadius(2.9f);
00676         blackHoleDetails->addKnowledge(KnowRadius);
00677     }
00678 
00679     return blackHoleDetails;
00680 }

float StarDetails::getBolometricCorrection  )  const [inline]
 

Definition at line 171 of file star.h.

References bolometricCorrection.

Referenced by Star::getBolometricMagnitude().

00172 {
00173     return bolometricCorrection;
00174 }

Vec3f StarDetails::getEllipsoidSemiAxes  )  const [inline]
 

Definition at line 195 of file star.h.

References semiAxes.

Referenced by Star::getEllipsoidSemiAxes().

00196 {
00197     return semiAxes;
00198 }

bool StarDetails::getKnowledge uint32   )  const [inline]
 

Definition at line 159 of file star.h.

References knowledge.

00160 {
00161     return ((knowledge & knowledgeFlags) == knowledgeFlags);
00162 }

uint32 StarDetails::getKnowledge  )  const [inline]
 

Definition at line 153 of file star.h.

References knowledge.

Referenced by Star::getRadius().

00154 {
00155     return knowledge;
00156 }

ResourceHandle StarDetails::getModel  )  const [inline]
 

Definition at line 129 of file star.h.

References model.

Referenced by Star::getModel().

00130 {
00131     return model;
00132 }

StarDetails * StarDetails::GetNeutronStarDetails  )  [static]
 

Definition at line 647 of file star.cpp.

References addKnowledge(), CreateStandardStarType(), KnowRadius, neutronStarDetails, setRadius(), setTexture(), and starTexA.

Referenced by GetStarDetails().

00648 {
00649     if (neutronStarDetails == NULL)
00650     {
00651         // The default neutron star has a rotation period of one second,
00652         // surface temperature of five million K.
00653         neutronStarDetails = CreateStandardStarType("Q", 5000000.0f,
00654                                                     1.0f / 86400.0f);
00655         neutronStarDetails->setRadius(10.0f);
00656         neutronStarDetails->addKnowledge(KnowRadius);
00657         neutronStarDetails->setTexture(MultiResTexture(starTexA, starTexA, starTexA));
00658     }
00659 
00660     return neutronStarDetails;
00661 }

StarDetails * StarDetails::GetNormalStarDetails StellarClass::SpectralClass  specClass,
unsigned int  subclass,
StellarClass::LuminosityClass  lumClass
[static]
 

Definition at line 403 of file star.cpp.

References bmag_correctionA, bmag_correctionB, bmag_correctionF, bmag_correctionG, bmag_correctionK, bmag_correctionL, bmag_correctionM, bmag_correctionO, bmag_correctionT, CreateStandardStarType(), LumClassNames, normalStarDetails, rotperiod_A, rotperiod_B, rotperiod_F, rotperiod_G, rotperiod_K, rotperiod_M, rotperiod_O, setBolometricCorrection(), setTexture(), SpectralClassNames, starTexA, starTexL, SubclassNames, tempA, tempB, tempF, tempG, tempK, tempL, tempM, tempO, tempT, tempWC, and tempWN.

Referenced by GetStarDetails().

00406 {
00407     if (normalStarDetails == NULL)
00408     {
00409         unsigned int nTypes = StellarClass::Spectral_Count * 11 * 
00410             StellarClass::Lum_Count;
00411         normalStarDetails = new StarDetails*[nTypes];
00412         for (unsigned int i = 0; i < nTypes; i++)
00413             normalStarDetails[i] = NULL;
00414     }
00415 
00416     if (subclass > StellarClass::Subclass_Unknown)
00417         subclass = StellarClass::Subclass_Unknown;
00418 
00419     uint index = subclass + (specClass + lumClass * StellarClass::Spectral_Count) * 11;
00420     if (normalStarDetails[index] == NULL)
00421     {
00422         char name[16];
00423         sprintf(name, "%s%s%s",
00424                 SpectralClassNames[specClass],
00425                 SubclassNames[subclass],
00426                 LumClassNames[lumClass]);
00427 
00428         // Use the same properties for an unknown subclass as for subclass 5
00429         if (subclass == StellarClass::Subclass_Unknown)
00430         {
00431             // Since early O and Wolf-Rayet stars are exceedingly rare,
00432             // use temperature of the more common late types when the subclass
00433             // is unspecified in the spectral type.  For other stars, default
00434             // to subclass 5.
00435             switch (specClass)
00436             {
00437             case StellarClass::Spectral_O:
00438             case StellarClass::Spectral_WN:
00439             case StellarClass::Spectral_WC:
00440                 subclass = 9;
00441                 break;
00442             default:
00443                 subclass = 5;
00444                 break;
00445             }
00446         }
00447 
00448         unsigned int lumIndex = 0;
00449         switch (lumClass)
00450         {
00451         case StellarClass::Lum_Ia0:
00452         case StellarClass::Lum_Ia:
00453         case StellarClass::Lum_Ib:
00454         case StellarClass::Lum_II:
00455             lumIndex = 2;
00456             break;
00457         case StellarClass::Lum_III:
00458         case StellarClass::Lum_IV:
00459             lumIndex = 1;
00460             break;
00461         case StellarClass::Lum_V:
00462         case StellarClass::Lum_VI:
00463         case StellarClass::Lum_Unknown:
00464             lumIndex = 0;
00465             break;
00466         }
00467 
00468         float temp = 0.0f;
00469         switch (specClass)
00470         {
00471         case StellarClass::Spectral_O:
00472             temp = tempO[lumIndex][subclass];
00473             break;
00474         case StellarClass::Spectral_B:
00475             temp = tempB[lumIndex][subclass];
00476             break;
00477         case StellarClass::Spectral_Unknown:
00478         case StellarClass::Spectral_A:
00479             temp = tempA[lumIndex][subclass];
00480             break;
00481         case StellarClass::Spectral_F:
00482             temp = tempF[lumIndex][subclass];
00483             break;
00484         case StellarClass::Spectral_G:
00485             temp = tempG[lumIndex][subclass];
00486             break;
00487         case StellarClass::Spectral_K:
00488             temp = tempK[lumIndex][subclass];
00489             break;
00490         case StellarClass::Spectral_M:
00491             temp = tempM[lumIndex][subclass];
00492             break;
00493         case StellarClass::Spectral_R:
00494             temp = tempK[lumIndex][subclass];
00495             break;
00496         case StellarClass::Spectral_S:
00497             temp = tempM[lumIndex][subclass];
00498             break;
00499         case StellarClass::Spectral_N:
00500             temp = tempM[lumIndex][subclass];
00501             break;
00502         case StellarClass::Spectral_C:
00503             temp = tempM[lumIndex][subclass];
00504             break;
00505         case StellarClass::Spectral_WN:
00506             temp = tempWN[subclass];
00507             break;
00508         case StellarClass::Spectral_WC:
00509             temp = tempWC[subclass];
00510             break;
00511         case StellarClass::Spectral_L:
00512             temp = tempL[subclass];
00513             break;
00514         case StellarClass::Spectral_T:
00515             temp = tempT[subclass];
00516             break;
00517         }
00518 
00519         float bmagCorrection = 0.0f;
00520         float period = 1.0f;
00521         switch (specClass)
00522         {
00523         case StellarClass::Spectral_O:
00524             period = rotperiod_O[lumIndex][subclass];
00525             bmagCorrection = bmag_correctionO[lumIndex][subclass];
00526             break;
00527         case StellarClass::Spectral_B:
00528             period = rotperiod_B[lumIndex][subclass];
00529             bmagCorrection = bmag_correctionB[lumIndex][subclass];
00530             break;
00531         case StellarClass::Spectral_Unknown:
00532         case StellarClass::Spectral_A:
00533             period = rotperiod_A[lumIndex][subclass];
00534             bmagCorrection = bmag_correctionA[lumIndex][subclass];
00535             break;
00536         case StellarClass::Spectral_F:
00537             period = rotperiod_F[lumIndex][subclass];
00538             bmagCorrection = bmag_correctionF[lumIndex][subclass];
00539             break;
00540         case StellarClass::Spectral_G:
00541             period = rotperiod_G[lumIndex][subclass];
00542             bmagCorrection = bmag_correctionG[lumIndex][subclass];
00543             break;
00544         case StellarClass::Spectral_K:
00545             period = rotperiod_K[lumIndex][subclass];
00546             bmagCorrection = bmag_correctionK[lumIndex][subclass];
00547             break;
00548         case StellarClass::Spectral_M:
00549             period = rotperiod_M[lumIndex][subclass];
00550             bmagCorrection = bmag_correctionM[lumIndex][subclass];
00551             break;
00552 
00553         case StellarClass::Spectral_R:
00554         case StellarClass::Spectral_S:
00555         case StellarClass::Spectral_N:
00556         case StellarClass::Spectral_C:
00557             period = rotperiod_M[lumIndex][subclass];
00558             bmagCorrection = bmag_correctionM[lumIndex][subclass];
00559             break;
00560 
00561         case StellarClass::Spectral_WC:
00562         case StellarClass::Spectral_WN:
00563             period = rotperiod_O[lumIndex][subclass];
00564             bmagCorrection = bmag_correctionO[lumIndex][subclass];
00565             break;
00566 
00567         case StellarClass::Spectral_L:
00568             // Assume that brown dwarfs are fast rotators like late M dwarfs
00569             period = 0.2f;
00570             bmagCorrection = bmag_correctionL[subclass];
00571             break;
00572 
00573         case StellarClass::Spectral_T:
00574             // Assume that brown dwarfs are fast rotators like late M dwarfs
00575             period = 0.2f;
00576             bmagCorrection = bmag_correctionT[subclass];
00577             break;
00578         }
00579 
00580         normalStarDetails[index] = CreateStandardStarType(name, temp, period);
00581         normalStarDetails[index]->setBolometricCorrection(bmagCorrection);
00582         
00583         if (specClass == StellarClass::Spectral_L ||
00584             specClass == StellarClass::Spectral_T)
00585         {
00586             normalStarDetails[index]->setTexture(MultiResTexture(starTexL, starTexL, starTexL));
00587         }
00588         else
00589         {
00590             normalStarDetails[index]->setTexture(MultiResTexture(starTexA, starTexA, starTexA));
00591         }
00592     }
00593 
00594     return normalStarDetails[index];
00595 }

Orbit * StarDetails::getOrbit  )  const [inline]
 

Definition at line 141 of file star.h.

References orbit.

Referenced by Star::getOrbit().

00142 {
00143     return orbit;
00144 }

float StarDetails::getOrbitalRadius  )  const [inline]
 

Definition at line 147 of file star.h.

References orbitalRadius.

Referenced by Star::getOrbitalRadius().

00148 {
00149     return orbitalRadius;
00150 }

Star * StarDetails::getOrbitBarycenter  )  const [inline]
 

Definition at line 177 of file star.h.

References barycenter.

Referenced by Star::getOrbitBarycenter().

00178 {
00179     return barycenter;
00180 }

float StarDetails::getRadius  )  const [inline]
 

Definition at line 117 of file star.h.

References radius.

Referenced by Star::getRadius().

00118 {
00119     return radius;
00120 }

const RotationElements & StarDetails::getRotationElements  )  const [inline]
 

Definition at line 189 of file star.h.

References rotationElements.

Referenced by CreateStandardStarType(), StarDatabase::createStar(), and Star::getRotationElements().

00190 {
00191     return rotationElements;
00192 }

const char * StarDetails::getSpectralType  )  const [inline]
 

Definition at line 165 of file star.h.

References spectralType.

Referenced by Star::getSpectralType(), and WriteStarDatabase().

00166 {
00167     return spectralType;
00168 }

StarDetails * StarDetails::GetStarDetails const StellarClass  )  [static]
 

Definition at line 361 of file star.cpp.

References GetBlackHoleDetails(), GetNeutronStarDetails(), GetNormalStarDetails(), and GetWhiteDwarfDetails().

Referenced by StarDatabase::createStar(), StarDatabase::loadBinary(), StarDatabase::loadOldFormatBinary(), and WriteStarDatabase().

00362 {
00363     switch (sc.getStarType())
00364     {
00365     case StellarClass::NormalStar:
00366         return GetNormalStarDetails(sc.getSpectralClass(),
00367                                     sc.getSubclass(),
00368                                     sc.getLuminosityClass());
00369                                     
00370     case StellarClass::WhiteDwarf:
00371         return GetWhiteDwarfDetails(sc.getSpectralClass(),
00372                                     sc.getSubclass());
00373     case StellarClass::NeutronStar:
00374         return GetNeutronStarDetails();
00375     case StellarClass::BlackHole:
00376         return GetBlackHoleDetails();
00377     default:
00378         return NULL;
00379     }
00380 }

float StarDetails::getTemperature  )  const [inline]
 

Definition at line 123 of file star.h.

References temperature.

Referenced by Star::getTemperature().

00124 {
00125     return temperature;
00126 }

MultiResTexture StarDetails::getTexture  )  const [inline]
 

Definition at line 135 of file star.h.

References texture.

Referenced by Star::getTexture().

00136 {
00137     return texture;
00138 }

bool StarDetails::getVisibility  )  const [inline]
 

Definition at line 183 of file star.h.

References visible.

Referenced by Star::getVisibility().

00184 {
00185     return visible;
00186 }

StarDetails * StarDetails::GetWhiteDwarfDetails StellarClass::SpectralClass  specClass,
unsigned int  subclass
[static]
 

Definition at line 599 of file star.cpp.

References CreateStandardStarType(), setTexture(), starTexA, SubclassNames, WDSpectralClassNames, and whiteDwarfDetails.

Referenced by GetStarDetails().

00601 {
00602     // Hack assumes all WD types are consecutive
00603     unsigned int scIndex = static_cast<unsigned int>(specClass) -
00604         StellarClass::FirstWDClass;
00605 
00606     if (whiteDwarfDetails == NULL)
00607     {
00608         unsigned int nTypes = 
00609             StellarClass::WDClassCount * StellarClass::SubclassCount;
00610         whiteDwarfDetails = new StarDetails*[nTypes];
00611         for (unsigned int i = 0; i < nTypes; i++)
00612             whiteDwarfDetails[i] = NULL;
00613     }
00614 
00615     if (subclass > StellarClass::Subclass_Unknown)
00616         subclass = StellarClass::Subclass_Unknown;
00617 
00618     uint index = subclass + (scIndex * StellarClass::SubclassCount);
00619     if (whiteDwarfDetails[index] == NULL)
00620     {
00621         char name[16];
00622         sprintf(name, "%s%s",
00623                 WDSpectralClassNames[scIndex],
00624                 SubclassNames[subclass]);
00625 
00626         float temp;
00627         if (subclass == 0)
00628             temp = 100000.0f;
00629         if (subclass == StellarClass::Subclass_Unknown)
00630             temp = 10080.0f;  // Treat unknown as subclass 5
00631         else
00632             temp = 50400.0f / subclass;
00633 
00634         // Assign white dwarfs a rotation period of half an hour; very
00635         // rough, as white rotation rates vary a lot.
00636         float period = 1.0f / 48.0f;
00637         
00638         whiteDwarfDetails[index] = CreateStandardStarType(name, temp, period);
00639         whiteDwarfDetails[index]->setTexture(MultiResTexture(starTexA, starTexA, starTexA));
00640     }
00641 
00642     return whiteDwarfDetails[index];
00643 }

void StarDetails::InitializeStarTextures  )  [static]
 

Definition at line 700 of file star.cpp.

References ResourceManager< T >::getHandle(), GetTextureManager(), starTexA, starTexB, starTexG, starTexL, and starTexM.

Referenced by CelestiaCore::readStars().

00701 {
00702     starTexB = GetTextureManager()->getHandle(TextureInfo("bstar.jpg", 0));
00703     starTexA = GetTextureManager()->getHandle(TextureInfo("astar.jpg", 0));
00704     starTexG = GetTextureManager()->getHandle(TextureInfo("gstar.jpg", 0));
00705     starTexM = GetTextureManager()->getHandle(TextureInfo("mstar.jpg", 0));
00706     starTexL = GetTextureManager()->getHandle(TextureInfo("browndwarf.jpg", 0));
00707 }

void StarDetails::setBolometricCorrection float   ) 
 

Definition at line 763 of file star.cpp.

References bolometricCorrection.

Referenced by GetNormalStarDetails().

00764 {
00765     bolometricCorrection = correction;
00766 }

void StarDetails::setEllipsoidSemiAxes const Vec3f  ) 
 

Definition at line 864 of file star.cpp.

References semiAxes.

Referenced by StarDatabase::createStar().

00865 {
00866     semiAxes = v;
00867 }

void StarDetails::setKnowledge uint32   ) 
 

Definition at line 749 of file star.cpp.

References knowledge.

00750 {
00751     knowledge = _knowledge;
00752 }

void StarDetails::setModel ResourceHandle   ) 
 

Definition at line 777 of file star.cpp.

References model.

Referenced by StarDatabase::createStar().

00778 {
00779     model = rh;
00780 }

void StarDetails::setOrbit Orbit  ) 
 

Definition at line 784 of file star.cpp.

References computeOrbitalRadius(), and orbit.

Referenced by StarDatabase::createStar().

00785 {
00786     orbit = o;
00787     computeOrbitalRadius();
00788 }

void StarDetails::setOrbitalRadius float   ) 
 

Definition at line 800 of file star.cpp.

References orbit, and orbitalRadius.

00801 {
00802     if (orbit != NULL)
00803         orbitalRadius = r;
00804 }

void StarDetails::setOrbitBarycenter Star  ) 
 

Definition at line 792 of file star.cpp.

References barycenter, and computeOrbitalRadius().

Referenced by Star::setOrbitBarycenter().

00793 {
00794     barycenter = bc;
00795     computeOrbitalRadius();
00796 }

void StarDetails::setRadius float   ) 
 

Definition at line 727 of file star.cpp.

References radius.

Referenced by StarDatabase::createStar(), GetBarycenterDetails(), GetBlackHoleDetails(), and GetNeutronStarDetails().

00728 {
00729     radius = _radius;
00730 }

void StarDetails::setRotationElements const RotationElements  ) 
 

Definition at line 831 of file star.cpp.

References rotationElements.

Referenced by CreateStandardStarType(), StarDatabase::createStar(), and Star::setRotationElements().

00832 {
00833     rotationElements = re;
00834 }

void StarDetails::setSpectralType const std::string  ) 
 

Definition at line 741 of file star.cpp.

References spectralType.

Referenced by CreateStandardStarType().

00742 {
00743     strncpy(spectralType, s.c_str(), sizeof(spectralType));
00744     spectralType[sizeof(spectralType) - 1] = '\0';
00745 }

void StarDetails::setTemperature float   ) 
 

Definition at line 734 of file star.cpp.

References temperature.

Referenced by CreateStandardStarType().

00735 {
00736     temperature = _temperature;
00737 }

void StarDetails::setTexture const MultiResTexture  ) 
 

Definition at line 770 of file star.cpp.

References texture.

Referenced by StarDatabase::createStar(), GetNeutronStarDetails(), GetNormalStarDetails(), and GetWhiteDwarfDetails().

00771 {
00772     texture = tex;
00773 }

void StarDetails::setVisibility bool   ) 
 

Definition at line 824 of file star.cpp.

References visible.

Referenced by GetBarycenterDetails().

00825 {
00826     visible = b;
00827 }


Member Data Documentation

Star* StarDetails::barycenter [private]
 

Definition at line 86 of file star.h.

Referenced by computeOrbitalRadius(), getOrbitBarycenter(), and setOrbitBarycenter().

float StarDetails::bolometricCorrection [private]
 

Definition at line 75 of file star.h.

Referenced by getBolometricCorrection(), and setBolometricCorrection().

uint32 StarDetails::knowledge [private]
 

Definition at line 77 of file star.h.

Referenced by addKnowledge(), getKnowledge(), and setKnowledge().

ResourceHandle StarDetails::model [private]
 

Definition at line 82 of file star.h.

Referenced by getModel(), and setModel().

Orbit* StarDetails::orbit [private]
 

Definition at line 84 of file star.h.

Referenced by computeOrbitalRadius(), getOrbit(), setOrbit(), and setOrbitalRadius().

float StarDetails::orbitalRadius [private]
 

Definition at line 85 of file star.h.

Referenced by computeOrbitalRadius(), getOrbitalRadius(), and setOrbitalRadius().

float StarDetails::radius [private]
 

Definition at line 73 of file star.h.

Referenced by getRadius(), and setRadius().

RotationElements StarDetails::rotationElements [private]
 

Definition at line 88 of file star.h.

Referenced by getRotationElements(), and setRotationElements().

Vec3f StarDetails::semiAxes [private]
 

Definition at line 90 of file star.h.

Referenced by getEllipsoidSemiAxes(), and setEllipsoidSemiAxes().

char StarDetails::spectralType[8] [private]
 

Definition at line 79 of file star.h.

Referenced by getSpectralType(), setSpectralType(), and StarDetails().

ResourceHandle StarDetails::starTexA = InvalidResource [static]
 

Definition at line 37 of file star.cpp.

Referenced by GetNeutronStarDetails(), GetNormalStarDetails(), GetWhiteDwarfDetails(), and InitializeStarTextures().

ResourceHandle StarDetails::starTexB = InvalidResource [static]
 

Definition at line 36 of file star.cpp.

Referenced by InitializeStarTextures().

ResourceHandle StarDetails::starTexG = InvalidResource [static]
 

Definition at line 38 of file star.cpp.

Referenced by InitializeStarTextures().

ResourceHandle StarDetails::starTexL = InvalidResource [static]
 

Definition at line 40 of file star.cpp.

Referenced by GetNormalStarDetails(), and InitializeStarTextures().

ResourceHandle StarDetails::starTexM = InvalidResource [static]
 

Definition at line 39 of file star.cpp.

Referenced by InitializeStarTextures().

float StarDetails::temperature [private]
 

Definition at line 74 of file star.h.

Referenced by getTemperature(), and setTemperature().

MultiResTexture StarDetails::texture [private]
 

Definition at line 81 of file star.h.

Referenced by getTexture(), and setTexture().

bool StarDetails::visible [private]
 

Definition at line 78 of file star.h.

Referenced by getVisibility(), and setVisibility().


The documentation for this class was generated from the following files:
Generated on Sat Jan 14 22:33:37 2006 for Celestia by  doxygen 1.4.1