CentralBody.cpp

Go to the documentation of this file.
00001 
00002 
00008 /* 
00009 *
00010 */
00012 
00013 #include "CentralBody.h"
00014 #include "Models/MagneticModel.h"
00015 namespace O_SESSAME {
00016 
00017 CentralBody::CentralBody() : m_ReferenceCount(0)
00018 {
00019 
00020 }
00021 
00022 void CentralBody::GetReference()
00023 {
00024     ++m_ReferenceCount;
00025     return;
00026 }
00027 void CentralBody::ReleaseReference()
00028 {
00029     --m_ReferenceCount;
00030     if(m_ReferenceCount <= 0)
00031     { 
00032         //delete *this;
00033     }
00034     return;
00035 }
00036 
00037 void CentralBody::SetMagneticModel(MagneticModel* _pNewMagModel) 
00038 { 
00039     m_pMagneticFieldModel = _pNewMagModel; 
00040     m_pMagneticFieldModel->SetMagFieldCoefficients(m_MagFieldCoeffs);
00041 }
00042 
00043 double CentralBody::GetAvgRotationRate()                {return m_AvgRotationRate;}
00044 
00045 double CentralBody::GetRadius()                 {return m_Radius;}
00046 
00047 CentralBody* CentralBody::operator= (CentralBody*) 
00048 {
00049     GetReference(); return this;
00050 }
00051 
00052 } // close namespace O_SESSAME
00053 
00054 // Do not change the comments below - they will be added automatically by CVS
00055 /*****************************************************************************
00056 *       $Log: CentralBody.cpp,v $
00057 *       Revision 1.2  2003/06/12 17:57:41  nilspace
00058 *       Added magnetic models.
00059 *       
00060 *       Revision 1.1  2003/06/06 17:34:53  nilspace
00061 *       Moved to CentralBody directory.
00062 *       
00063 *       Revision 1.3  2003/04/27 22:04:33  nilspace
00064 *       Created the namespace O_SESSAME.
00065 *       
00066 *       Revision 1.2  2003/04/23 16:29:46  nilspace
00067 *       Updated makefile directories.
00068 *       
00069 *       Revision 1.1  2003/04/08 22:35:11  nilspace
00070 *       Initial Submission.
00071 *
00072 ******************************************************************************/

Generated on Wed Aug 6 12:58:43 2003 for Open-Sessame Framework by doxygen1.3