#include <PerspectiveInstrument.hpp>
Public Member Functions | |
Direction | bfkobs (const Position &bfr) const override |
Direction | bfky (const Position &bfr) const override |
double | crossX () const |
double | crossY () const |
double | crossZ () const |
void | determineSameObserverAsPreceding (const Instrument *precedingInstrument) override |
double | focal () const |
int | numPixelsX () const |
int | numPixelsY () const |
double | upX () const |
double | upY () const |
double | upZ () const |
double | viewX () const |
double | viewY () const |
double | viewZ () const |
double | width () const |
![]() | |
virtual Direction | bfkobs (const Position &bfr) const =0 |
virtual Direction | bfky (const Position &bfr) const =0 |
virtual void | detect (PhotonPacket *pp)=0 |
virtual void | determineSameObserverAsPreceding (const Instrument *precedingInstrument)=0 |
void | flush () |
string | instrumentName () const |
const WavelengthGrid * | instrumentWavelengthGrid () const |
bool | isSameObserverAsPreceding () const |
string | itemName () const override |
int | numScatteringLevels () const |
bool | recordComponents () const |
bool | recordPolarization () const |
bool | recordStatistics () const |
WavelengthGrid * | wavelengthGrid () const |
void | write () |
![]() | |
template<class T > | |
T * | find (bool setup=true) const |
template<class T > | |
T * | interface (int levels=-999999, bool setup=true) const |
virtual string | itemName () const |
void | setup () |
string | typeAndName () const |
![]() | |
Item (const Item &)=delete | |
virtual | ~Item () |
void | addChild (Item *child) |
const vector< Item * > & | children () const |
virtual void | clearItemListProperty (const PropertyDef *property) |
void | destroyChild (Item *child) |
virtual bool | getBoolProperty (const PropertyDef *property) const |
virtual vector< double > | getDoubleListProperty (const PropertyDef *property) const |
virtual double | getDoubleProperty (const PropertyDef *property) const |
virtual string | getEnumProperty (const PropertyDef *property) const |
virtual int | getIntProperty (const PropertyDef *property) const |
virtual vector< Item * > | getItemListProperty (const PropertyDef *property) const |
virtual Item * | getItemProperty (const PropertyDef *property) const |
virtual string | getStringProperty (const PropertyDef *property) const |
int | getUtilityProperty (string name) const |
virtual void | insertIntoItemListProperty (const PropertyDef *property, int index, Item *item) |
Item & | operator= (const Item &)=delete |
Item * | parent () const |
virtual void | removeFromItemListProperty (const PropertyDef *property, int index) |
virtual void | setBoolProperty (const PropertyDef *property, bool value) |
virtual void | setDoubleListProperty (const PropertyDef *property, vector< double > value) |
virtual void | setDoubleProperty (const PropertyDef *property, double value) |
virtual void | setEnumProperty (const PropertyDef *property, string value) |
virtual void | setIntProperty (const PropertyDef *property, int value) |
virtual void | setItemProperty (const PropertyDef *property, Item *item) |
virtual void | setStringProperty (const PropertyDef *property, string value) |
void | setUtilityProperty (string name, int value) |
virtual string | type () const |
Protected Member Functions | |
PerspectiveInstrument () | |
void | detect (PhotonPacket *pp) override |
void | setupSelfBefore () override |
![]() | |
Instrument () | |
~Instrument () | |
FluxRecorder * | instrumentFluxRecorder () |
void | setSameObserverAsPreceding () |
void | setupSelfAfter () override |
void | setupSelfBefore () override |
![]() | |
SimulationItem () | |
virtual bool | offersInterface (const std::type_info &interfaceTypeInfo) const |
virtual void | setupSelfAfter () |
virtual void | setupSelfBefore () |
![]() | |
Item () | |
Private Types | |
using | BaseType = Instrument |
using | ItemType = PerspectiveInstrument |
Private Attributes | |
Direction | _bfky |
double | _crossX |
double | _crossY |
double | _crossZ |
const double & | _Cx |
const double & | _Cy |
const double & | _Cz |
double | _Ex |
double | _Ey |
double | _Ez |
const double & | _Fe |
double | _focal |
int | _numPixelsX |
int | _numPixelsY |
const int & | _Nx |
const int & | _Ny |
double | _s |
const double & | _Sx |
HomogeneousTransform | _transform |
double | _upX |
double | _upY |
double | _upZ |
const double & | _Ux |
const double & | _Uy |
const double & | _Uz |
double | _viewX |
double | _viewY |
double | _viewZ |
const double & | _Vx |
const double & | _Vy |
const double & | _Vz |
double | _width |
Friends | |
class | ItemRegistry |
The PerspectiveInstrument class implements a full perspective view of the simulated model, with arbitrary placement of the viewport outside or inside the model. Only photon packets arriving from the front are recorded; light emitted behind the viewport is ignored. For each wavelength the instrument outputs the detected surface brightness in every pixel of a given frame as a data cube in a FITS file. The instrument does not support recording of spatially integrated flux densities.
The perspective instrument is intended mostly for making movies. Each movie frame is generated by a separate perspective instrument with the appropriate parameters.
This item type is displayed only if the Boolean expression "Level2" evaluates to true after replacing the names by true or false depending on their presence.
|
inlineprotected |
Default constructor for concrete Item subclass PerspectiveInstrument : "a perspective instrument (mostly for making movies)" .
Returns the direction towards the eye from the given photon packet launching position.
Implements Instrument.
Returns the direction along the positive y-axis of the instrument frame, expressed in model coordinates. The provided photon packet's launching position is not used because the orientation of the instrument frame does not depend on it.
Implements Instrument.
|
inline |
This function returns the value of the discoverable double property crossX : "the position of the crosshair, x component" .
This property represents a physical quantity of type "length" .
|
inline |
This function returns the value of the discoverable double property crossY : "the position of the crosshair, y component" .
This property represents a physical quantity of type "length" .
|
inline |
This function returns the value of the discoverable double property crossZ : "the position of the crosshair, z component" .
This property represents a physical quantity of type "length" .
|
overrideprotectedvirtual |
This function simulates the detection of a photon packet by the instrument.
Implements Instrument.
|
overridevirtual |
This function determines whether the specified instrument has the same observer type, position and viewing direction as the receiving instrument, and if so, calls the setSameObserverAsPreceding() function to remember the fact.
Implements Instrument.
|
inline |
This function returns the value of the discoverable double property focal : "the distance from the eye to the viewport origin" .
This property represents a physical quantity of type "length" .
The minimum value for this property is "]0" .
|
inline |
This function returns the value of the discoverable integer property numPixelsX : "the number of viewport pixels in the horizontal direction" .
The minimum value for this property is "25" .
The maximum value for this property is "10000" .
The default value for this property is given by the conditional value expression "250" .
|
inline |
This function returns the value of the discoverable integer property numPixelsY : "the number of viewport pixels in the vertical direction" .
The minimum value for this property is "25" .
The maximum value for this property is "10000" .
The default value for this property is given by the conditional value expression "250" .
|
overrideprotectedvirtual |
This function verifies that all attribute values have been appropriately set and performs setup for the instrument. Its most important task is to determine the appropriate perspective transformation.
Reimplemented from Instrument.
|
inline |
This function returns the value of the discoverable double property upX : "the upwards direction, x component" .
This property represents a physical quantity of type "length" .
|
inline |
This function returns the value of the discoverable double property upY : "the upwards direction, y component" .
This property represents a physical quantity of type "length" .
|
inline |
This function returns the value of the discoverable double property upZ : "the upwards direction, z component" .
This property represents a physical quantity of type "length" .
|
inline |
This function returns the value of the discoverable double property viewX : "the position of the viewport origin, x component" .
This property represents a physical quantity of type "length" .
|
inline |
This function returns the value of the discoverable double property viewY : "the position of the viewport origin, y component" .
This property represents a physical quantity of type "length" .
|
inline |
This function returns the value of the discoverable double property viewZ : "the position of the viewport origin, z component" .
This property represents a physical quantity of type "length" .
|
inline |
This function returns the value of the discoverable double property width : "the width of the viewport" .
This property represents a physical quantity of type "length" .
The minimum value for this property is "]0" .