Gyoto
GyotoComplexAstrobj.h
Go to the documentation of this file.
1 
8 /*
9  Copyright 2011, 2013-2014, 2016 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 
28 #ifndef __GyotoComplexAstrobj_H_
29 #define __GyotoComplexAstrobj_H_
30 
31 #include <GyotoAstrobj.h>
32 
33 namespace Gyoto{
34  namespace Astrobj {
35  class Complex;
36  }
37 }
38 
75 
76  // Data :
77  // -----
78  protected:
79 
84 
88  Gyoto::SmartPointer<Gyoto::Astrobj::Generic> * elements_;
89 
93  double step_max_;
94 
95  public:
97  Complex();
98  Complex(const Complex& ) ;
99  virtual Complex* clone() const;
100 
101  virtual double deltaMax(double coord[8]);
102 
103  // make all the other version of rMax work
104  using Generic::rMax;
105 
107 
121  virtual double rMax();
122 
126  virtual ~Complex() ;
127 
128  // Mutators
129  // --------
130  public:
139  void append(Gyoto::SmartPointer<Gyoto::Astrobj::Generic> element);
141  void remove(size_t i);
143  size_t getCardinal() const;
145  using Generic::metric;
146  void metric(SmartPointer<Metric::Generic> gg);
148 
149  public:
150 #ifdef GYOTO_USE_XERCES
151  virtual void fillElement(FactoryMessenger *fmp) const ;
152  virtual void setParameters(FactoryMessenger *fmp);
153 #endif
154 
155  // Outputs
156  // -------
157  public:
158 
175  virtual int Impact(Gyoto::Photon* ph, size_t index,
176  Astrobj::Properties *data=NULL) ;
178 
179 
190  Gyoto::SmartPointer<Gyoto::Astrobj::Generic>& operator[](size_t i) ;
192  Gyoto::SmartPointer<Gyoto::Astrobj::Generic> const&operator[](size_t i) const;
194 
195 };
196 
197 #endif
void append(Gyoto::SmartPointer< Gyoto::Astrobj::Generic > element)
Add element at the end of the array.
virtual double deltaMax(double coord[8])
Get max step constraint for adaptive integration.
Astronomical objects (light emitters)
#define GYOTO_OBJECT_THREAD_SAFETY
Declare virtual bool isThreadSafe() const.
Definition: GyotoObject.h:99
void remove(size_t i)
Remove i-th element from the array.
#define size_t
If not defined in <sys/types.h>.
Definition: GyotoConfig.h:424
virtual void setParameters(FactoryMessenger *fmp)
Main loop in Subcontractor_t function.
virtual double rMax()
Get maximal distance from center of coordinate system.
virtual Complex * clone() const
"Virtual" copy constructor
virtual void fillElement(FactoryMessenger *fmp) const
Fill the XML element for this Object.
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:46
Pointers performing reference counting.
Definition: GyotoProperty.h:45
double step_max_
Maximum δ step inside the Astrobj.
Definition: GyotoComplexAstrobj.h:93
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
virtual double rMax()
Get maximal distance from center of coordinate system.
size_t cardinal_
Number of objects.
Definition: GyotoComplexAstrobj.h:83
Base class for astronomical object.
Definition: GyotoAstrobj.h:205
Complex astronomical object.
Definition: GyotoComplexAstrobj.h:73
Gyoto::SmartPointer< Gyoto::Astrobj::Generic > * elements_
Array of Astrobj::Generic.
Definition: GyotoComplexAstrobj.h:88
size_t getCardinal() const
Get the number of elements in the array.
virtual int Impact(Gyoto::Photon *ph, size_t index, Astrobj::Properties *data=NULL)
Call Impact() for each of the elements.