Gyoto
GyotoStandardAstrobj.h
Go to the documentation of this file.
1 
13 /*
14  Copyright 2011 Thibaut Paumard, Frederic Vincent
15 
16  This file is part of Gyoto.
17 
18  Gyoto is free software: you can redistribute it and/or modify
19  it under the terms of the GNU General Public License as published by
20  the Free Software Foundation, either version 3 of the License, or
21  (at your option) any later version.
22 
23  Gyoto is distributed in the hope that it will be useful,
24  but WITHOUT ANY WARRANTY; without even the implied warranty of
25  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26  GNU General Public License for more details.
27 
28  You should have received a copy of the GNU General Public License
29  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
30  */
31 
32 
33 #ifndef __GyotoStandardAstrobj_H_
34 #define __GyotoStandardAstrobj_H_
35 
36 #include <iostream>
37 #include <fstream>
38 #include <iomanip>
39 #include <string>
40 
41 #include "GyotoAstrobj.h"
42 #include "GyotoFunctors.h"
43 
44 namespace Gyoto{
45  namespace Astrobj {
46  class Standard;
47  }
48 }
49 
87 {
88  friend class Gyoto::SmartPointer<Gyoto::Astrobj::Standard>;
89 
90 
91  // Data :
92  // -----
93  protected:
94  double critical_value_;
95  double safety_value_;
96 
97  // Constructors - Destructor
98  // -------------------------
99  public:
103  Standard();
104 
108  Standard(double radmax);
109 
113  Standard(std::string kind);
114 
118  Standard(const Standard& ) ;
119 
120  virtual ~Standard() ;
121 
122  // Accessors
123  // ---------
124  public:
125  virtual void setSafetyValue(double val) ;
126  virtual double getSafetyValue() const ;
127 
128  // Outputs
129  // -------
130  public:
131  virtual int Impact(Gyoto::Photon* ph, size_t index,
132  Astrobj::Properties *data=NULL) ;
133 
142  virtual double operator()(double const coord[4]) = 0;
143 
152  virtual void getVelocity(double const pos[4], double vel[4]) = 0 ;
153 
163  virtual double giveDelta(double coord[8]);
164 
165  virtual int setParameter(std::string name, std::string content) ;
166 
167 
168 #ifdef GYOTO_USE_XERCES
169  virtual void fillElement(FactoryMessenger *fmp) const ;
170 #endif
171 
172 };
173 
174 
175 #endif