Gyoto
GyotoScenery.h
Go to the documentation of this file.
1 
8 /*
9  Copyright 2011 Thibaut Paumard
10 
11  This file is part of Gyoto.
12 
13  Gyoto is free software: you can redistribute it and/or modify
14  it under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  Gyoto is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  GNU General Public License for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
25  */
26 
27 #ifndef __GyotoScenery_H_
28 #define __GyotoScenery_H_
29 
30 namespace Gyoto{
31  class Scenery;
32 }
33 
34 #include <GyotoDefs.h>
35 #include <GyotoSmartPointer.h>
36 #include <GyotoAstrobj.h>
37 #include <GyotoMetric.h>
38 #include <GyotoScreen.h>
39 #include <GyotoPhoton.h>
40 
95  friend class Gyoto::SmartPointer<Gyoto::Scenery>;
96 
97 
98  // Data :
99  // -----
100  protected:
104  SmartPointer<Metric::Generic> gg_;
105 
110 
114  SmartPointer<Astrobj::Generic> obj_;
115 
119  double delta_; // default integration step for the photons
120 
126 
131 
139  double tlim_;
140 
141  // Constructors - Destructor
142  // -------------------------
143  public:
144  Scenery();
145  Scenery (const Scenery& o);
146  Scenery * clone() const;
147 
152  Scenery(SmartPointer<Metric::Generic>, SmartPointer<Screen>, SmartPointer<Astrobj::Generic>);
153 
154  ~Scenery();
155 
156  // Mutators / assignment
157  // ---------------------
158  public:
159  // Accessors
160  // ---------
161  SmartPointer<Metric::Generic> getMetric();
162 
165  void setMetric(SmartPointer<Metric::Generic>);
166  SmartPointer<Screen> getScreen();
167 
171  void setScreen(SmartPointer<Screen>);
172  SmartPointer<Astrobj::Generic> getAstrobj();
176  void setAstrobj(SmartPointer<Astrobj::Generic>);
177  double getDelta() const ;
178  void setDelta(double);
179 
180  void setRequestedQuantities(Quantity_t) ;
181  void setRequestedQuantities(std::string) ;
182  Quantity_t getRequestedQuantities() const ;
183  std::string getRequestedQuantitiesString() const ;
184  size_t getScalarQuantitiesCount() const ;
185 
186  void setTlim(double);
187  double getTlim() const ;
188 
189  // Worker:
190  public:
191  void rayTrace(size_t imin, size_t imax, size_t jmin, size_t jmax,
192  Astrobj::Properties* data, double * impactcoords = NULL);
193 
194  void operator() (size_t i, size_t j, Astrobj::Properties *data,
195  double * impactcoords = NULL);
196 
197 #ifdef GYOTO_USE_XERCES
198  public:
199  void fillElement(FactoryMessenger *fmp);
200 #endif
201 
202 };
203 
204 #ifdef GYOTO_USE_XERCES
205 namespace Gyoto {
206  SmartPointer<Scenery> ScenerySubcontractor(Gyoto::FactoryMessenger*);
207 }
208 #endif
209 
210 #endif