Gyoto
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
Gyoto::Scenery Class Reference

Ray-tracing scene. More...

#include <GyotoScenery.h>

Inheritance diagram for Gyoto::Scenery:
Gyoto::SmartPointee

Public Member Functions

 Scenery ()
 Set everything to defaults.
 Scenery (const Scenery &o)
 Copy constructor.
Sceneryclone () const
 Cloner.
 Scenery (SmartPointer< Metric::Generic >, SmartPointer< Screen >, SmartPointer< Astrobj::Generic >)
SmartPointer< Metric::GenericgetMetric ()
 Get Metric.
void setMetric (SmartPointer< Metric::Generic >)
 Set Metric.
SmartPointer< Screen > getScreen ()
 Get Screen object.
void setScreen (SmartPointer< Screen >)
 Set screen object.
SmartPointer< Astrobj::GenericgetAstrobj ()
void setAstrobj (SmartPointer< Astrobj::Generic >)
double getDelta () const
void setDelta (double)
void setRequestedQuantities (Quantity_t)
void setRequestedQuantities (std::string)
Quantity_t getRequestedQuantities () const
std::string getRequestedQuantitiesString () const
size_t getScalarQuantitiesCount () const
void setTlim (double)
 set tlim_;
double getTlim () const
 get tlim_
void rayTrace (size_t imin, size_t imax, size_t jmin, size_t jmax, Astrobj::Properties *data, double *impactcoords=NULL)
void operator() (size_t i, size_t j, Astrobj::Properties *data, double *impactcoords=NULL)
void fillElement (FactoryMessenger *fmp)
 called from Factory

Protected Types

typedef Gyoto::SmartPointer
< Gyoto::SmartPointee
Subcontractor_t (Gyoto::FactoryMessenger *)
 A subcontractor builds an object upon order from the Factory.

Protected Member Functions

void incRefCount ()
 Increment the reference counter. Warning: Don't mess with the counter.
int decRefCount ()
 Decrement the reference counter and return current value. Warning: Don't mess with the counter.
int getRefCount ()
 Get the current number of references.

Protected Attributes

SmartPointer< Metric::Genericgg_
SmartPointer< Screen > screen_
SmartPointer< Astrobj::Genericobj_
double delta_
Gyoto::Quantity_t quantities_
Gyoto::Photon ph_
 a Photon.
double tlim_
 Time limit for the integration (geometrical units)

Friends

class Gyoto::SmartPointer< Gyoto::Scenery >

Detailed Description

Ray-tracing scene.

An Scenery contains:

In addition, Quantities may be specified (or the default Quantity will be produced: generally Intensity). Not all Astrobj implement all Quantities. The order in which Quantities are listed is not relevant (it is not stored). A value of the integration step for the Photon's trajectory can be specified in Delta. It will be used as the initial step, which is adaptive. Possible Quantities:

Thus a fully populated Scenery XML looks like that:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Metric kind = "MetricKind">
<MetricProperties/>
</Metric>
<Screen>
<ScreenProperties/>
</Screen>
<Astrobj kind = "AstrobjKind">
<AstrobjParameters/>
</Astrobj>
<Quantities> Spectrum Intensity ...</Quantities>
<Delta> 1. </Delta>

Member Typedef Documentation

typedef Gyoto::SmartPointer<Gyoto::SmartPointee> Gyoto::SmartPointee::Subcontractor_t(Gyoto::FactoryMessenger *)
inherited

A subcontractor builds an object upon order from the Factory.

Various classes need to provide a subcontractor to be able to instanciate themselves upon order from the Factory. A subcontractor is a function (often a static member function) which accepts a pointer to a FactoryMessenger as unique parameter, communicates with the Factory using this messenger to read an XML description of the object to build, and returns this objet. SmartPointee::Subcontractor_t* is just generic enough a typedef to cast to and from other subcontractor types: Astrobj::Subcontractor_t, Metric::Subcontractor_t, Spectrum::Subcontractor_t. A subcontractor needs to be registered using the relevant Register() function: Astrobj::Register(), Metric::Register(), Spectrum::Register().

Constructor & Destructor Documentation

Gyoto::Scenery::Scenery ( SmartPointer< Metric::Generic ,
SmartPointer< Screen >  ,
SmartPointer< Astrobj::Generic  
)

To ensure consistency, the Metric will be forcibly attached to the Screen and to the Astrobj.

Member Function Documentation

void Gyoto::Scenery::setAstrobj ( SmartPointer< Astrobj::Generic )

The Metric attached to the Scenery will be attached to the Astrobj

void Gyoto::Scenery::setMetric ( SmartPointer< Metric::Generic )

Set Metric.

The provided Metric will also be atached to the Screen and the Astrobj.

void Gyoto::Scenery::setScreen ( SmartPointer< Screen >  )

Set screen object.

The Metric attached to the Scenery will be attached to the Screen

Member Data Documentation

double Gyoto::Scenery::delta_
protected

Default integration step for the photons

SmartPointer<Metric::Generic> Gyoto::Scenery::gg_
protected

The Metric, or stage, for this scenery.

SmartPointer<Astrobj::Generic> Gyoto::Scenery::obj_
protected

The astrophysical emitting light in this scenery... the actor.

Gyoto::Photon Gyoto::Scenery::ph_
protected

a Photon.

Used internally to not always reallocate memory when operator() is called.

Gyoto::Quantity_t Gyoto::Scenery::quantities_
protected

The list of quantities that will be computed, for instance: GYOTO_QUANTITY_INTENSITY | GYOTO_QUANTITY_EMISSIONTIME | ...

SmartPointer<Screen> Gyoto::Scenery::screen_
protected

Screen, the camera for this scenery.

double Gyoto::Scenery::tlim_
protected

Time limit for the integration (geometrical units)

Computation does not go back before tlim_. Default is 0. tlim_ is always expressed in geometrical units, it is essentially a tunig parameter for the ray-tracing process. tlim should be chosen to always be longer than the distance between the screen and the object.


The documentation for this class was generated from the following file: