Gyoto
GyotoTorus.h
Go to the documentation of this file.
1 
7 /*
8  Copyright 2011 Thibaut Paumard
9 
10  This file is part of Gyoto.
11 
12  Gyoto is free software: you can redistribute it and/or modify
13  it under the terms of the GNU General Public License as published by
14  the Free Software Foundation, either version 3 of the License, or
15  (at your option) any later version.
16 
17  Gyoto is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  GNU General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
24  */
25 
26 #ifndef __GyotoTorus_H_
27 #define __GyotoTorus_H_
28 
29 #include <iostream>
30 #include <fstream>
31 #include <iomanip>
32 #include <string>
33 
34 namespace Gyoto{
35  namespace Astrobj { class Torus; }
36 }
37 
38 #include <GyotoStandardAstrobj.h>
39 #include <GyotoSpectrum.h>
40 #include <GyotoUtils.h>
41 
50  friend class Gyoto::SmartPointer<Gyoto::Astrobj::Torus>;
51 
52 
53  // Data :
54  // -----
55  protected:
61  double c_;
62 
63  SmartPointer<Spectrum::Generic> spectrum_;
64  SmartPointer<Spectrum::Generic> opacity_;
65 
66  // Constructors - Destructor
67  // -------------------------
68  public:
72  Torus();
73 
74  Torus(const Torus& ) ;
75  virtual Torus* clone() const;
76 
77  virtual ~Torus() ;
78 
79  // Accessors
80  // ---------
81  public:
85  double getLargeRadius() const;
86 
90  double getSmallRadius() const;
91 
92  void setLargeRadius(double c);
93  void setSmallRadius(double a);
94  virtual void setSpectrum(SmartPointer<Spectrum::Generic>);
95  virtual SmartPointer<Spectrum::Generic> getSpectrum() const;
96  virtual void setOpacity(SmartPointer<Spectrum::Generic>);
97  virtual SmartPointer<Spectrum::Generic> getOpacity() const;
98 
99  virtual double getRmax();
100 
101  //XML I/O
102  public:
103  virtual int setParameter(std::string name, std::string content) ;
104 
105 #ifdef GYOTO_USE_XERCES
106  virtual void fillElement(FactoryMessenger *fmp) const ;
108  virtual void setParameters(FactoryMessenger *fmp) ;
109 #endif
110 
111  // Outputs
112  // -------
113  public:
114  virtual double operator()(double const coord[4]) ;
115 
116  protected:
117  virtual void getVelocity(double const pos[4], double vel[4]) ;
118 
119  virtual double emission(double nu_em, double dsem, double coord_ph[8],
120  double coord_obj[8]=NULL) const ;
121 
122  virtual double integrateEmission(double nu1, double nu2, double dsem,
123  double c_ph[8], double c_obj[8]=NULL) const;
125 
126  virtual double transmission(double nuem, double dsem, double coord[8]) const ;
128 
129  // Display
130  //friend std::ostream& operator<<(std::ostream& , const Astrobj& ) ;
131 
132 };
133 
134 #endif