GyotoComplexAstrobj.h
Go to the documentation of this file.
/*
Copyright 2011, 2013-2014, 2016 Thibaut Paumard
This file is part of Gyoto.
Gyoto is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gyoto is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GyotoComplexAstrobj_H_
#define __GyotoComplexAstrobj_H_
#include <GyotoAstrobj.h>
namespace Gyoto{
namespace Astrobj {
class Complex;
}
}
class Gyoto::Astrobj::Complex : public Gyoto::Astrobj::Generic {
friend class Gyoto::SmartPointer<Gyoto::Astrobj::Complex>;
// Data :
// -----
protected:
size_t cardinal_;
Gyoto::SmartPointer<Gyoto::Astrobj::Generic> * elements_;
double step_max_;
public:
GYOTO_OBJECT_THREAD_SAFETY;
Complex();
Complex(const Complex& ) ;
virtual Complex* clone() const;
virtual double deltaMax(double coord[8]);
virtual double rMax();
virtual ~Complex() ;
// Mutators
// --------
public:
void append(Gyoto::SmartPointer<Gyoto::Astrobj::Generic> element);
void remove(size_t i);
size_t getCardinal() const;
using Generic::metric;
void metric(SmartPointer<Metric::Generic> gg);
public:
#ifdef GYOTO_USE_XERCES
virtual void fillElement(FactoryMessenger *fmp) const ;
virtual void setParameters(FactoryMessenger *fmp);
#endif
// Outputs
// -------
public:
virtual int Impact(Gyoto::Photon* ph, size_t index,
Astrobj::Properties *data=NULL) ;
Gyoto::SmartPointer<Gyoto::Astrobj::Generic>& operator[](size_t i) ;
Gyoto::SmartPointer<Gyoto::Astrobj::Generic> const&operator[](size_t i) const;
};
#endif
GyotoAstrobj.h
Astronomical objects (light emitters).
size_t
#define size_t
If not defined in <sys/types.h>.
Definition GyotoConfig.h:390
Gyoto::Astrobj::Complex
Complex astronomical object.
Definition GyotoComplexAstrobj.h:73
Gyoto::Astrobj::Complex::Complex
Complex()
Default constructor.
Gyoto::Astrobj::Complex::Impact
virtual int Impact(Gyoto::Photon *ph, size_t index, Astrobj::Properties *data=NULL)
Call Impact() for each of the elements.
Gyoto::Astrobj::Complex::rMax
virtual double rMax()
Gyoto::Astrobj::Complex::setParameters
virtual void setParameters(FactoryMessenger *fmp)
Main loop in Subcontractor_t function.
Gyoto::Astrobj::Complex::metric
void metric(SmartPointer< Metric::Generic > gg)
Set metric in each element.
Gyoto::Astrobj::Complex::fillElement
virtual void fillElement(FactoryMessenger *fmp) const
Fill the XML element for this Object.
Gyoto::Astrobj::Complex::append
void append(Gyoto::SmartPointer< Gyoto::Astrobj::Generic > element)
Add element at the end of the array.
Gyoto::Astrobj::Complex::remove
void remove(size_t i)
Remove i-th element from the array.
Gyoto::Astrobj::Complex::cardinal_
size_t cardinal_
Number of objects.
Definition GyotoComplexAstrobj.h:83
Gyoto::Astrobj::Complex::step_max_
double step_max_
Maximum δ step inside the Astrobj.
Definition GyotoComplexAstrobj.h:93
Gyoto::Astrobj::Complex::deltaMax
virtual double deltaMax(double coord[8])
Get max step constraint for adaptive integration.
Gyoto::Astrobj::Complex::clone
virtual Complex * clone() const
"Virtual" copy constructor
Gyoto::Astrobj::Complex::elements_
Gyoto::SmartPointer< Gyoto::Astrobj::Generic > * elements_
Array of Astrobj::Generic.
Definition GyotoComplexAstrobj.h:88
Gyoto::Astrobj::Complex::getCardinal
size_t getCardinal() const
Get the number of elements in the array.
Gyoto::Astrobj::Generic
Base class for astronomical object.
Definition GyotoAstrobj.h:200
Gyoto::Astrobj::Generic::metric
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
Gyoto::SmartPointer
Pointers performing reference counting.
Definition GyotoSmartPointer.h:135
Gyoto::Astrobj
Access to astronomical objects.
Definition GyotoAstrobj.h:49
Gyoto
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44