RayZaler 0.1
The free opto-mechanical simulation framework
RZ::OMModel Class Reference
Inheritance diagram for RZ::OMModel:

Public Member Functions

bool registerFrame (ReferenceFrame *)
 
void setFrameAlias (ReferenceFrame *, std::string const &name)
 
ElementautoRegisterElement (Element *)
 
ReferenceFrameworld () const
 
Simulationsimulation () const
 
void linkWorld (ReferenceFrame *)
 
template<class T >
T * plug (std::string const &existing, std::string const &port, std::string const &type, std::string const &name="")
 
template<class T >
T * plug (std::string const &existingFrame, std::string const &type, std::string const &name="")
 
void recalculate ()
 
RayBeamElementbeam () const
 
void clearBeam ()
 
void setBeamColoring (RayColoring const *coloring)
 
ReferenceFrameContext rotate (Real, Vec3 const &, ReferenceFrame *parent=nullptr)
 
ReferenceFrameContext rotate (Real, Real, Real, Real, ReferenceFrame *parent=nullptr)
 
ReferenceFrameContext translate (Vec3 const &, ReferenceFrame *parent=nullptr)
 
ReferenceFrameContext translate (Real, Real, Real, ReferenceFrame *parent=nullptr)
 
bool addOpticalPath (std::string const &, std::list< std::string > const &)
 
bool addDetector (std::string const &name, ReferenceFrame *pFrame, unsigned int cols=RZ_DEFAULT_CCD_RESOLUTION, unsigned int rows=RZ_DEFAULT_CCD_RESOLUTION, Real width=RZ_DEFAULT_CCD_WIDTH, Real height=RZ_DEFAULT_CCD_WIDTH)
 
bool addDetector (std::string const &name, std::string const &parentFrame, unsigned int cols=RZ_DEFAULT_CCD_RESOLUTION, unsigned int rows=RZ_DEFAULT_CCD_RESOLUTION, Real width=RZ_DEFAULT_CCD_WIDTH, Real height=RZ_DEFAULT_CCD_WIDTH)
 
std::list< std::string > frames () const
 
std::list< std::string > elements () const
 
std::list< std::string > opticalElements () const
 
std::list< std::string > detectors () const
 
std::list< std::string > opticalPaths () const
 
std::list< std::string > elementHierarchy (std::string const &pfx="") const
 
std::list< std::string > opticalElementHierarchy (std::string const &pfx="") const
 
void boundingBox (Vec3 &, Vec3 &) const
 
std::list< Element * > const & elementList () const
 
std::list< Element * > allElements () const
 
std::list< OpticalElement * > allOpticalElements () const
 
ReferenceFramelookupReferenceFrame (std::string const &) const
 
ElementresolveElement (std::string const &) const
 
ElementlookupElement (std::string const &) const
 
OpticalElementresolveOpticalElement (std::string const &) const
 
OpticalElementlookupOpticalElement (std::string const &) const
 
DetectorlookupDetector (std::string const &) const
 
const OpticalPathlookupOpticalPath (std::string const &="") const
 
ReferenceFramelookupReferenceFrameOrEx (std::string const &) const
 
ElementlookupElementOrEx (std::string const &) const
 
OpticalElementlookupOpticalElementOrEx (std::string const &) const
 
DetectorlookupDetectorOrEx (std::string const &) const
 
const OpticalPathlookupOpticalPathOrEx (std::string const &="") const
 
bool trace (std::string const &path, std::list< RZ::Ray > const &rays, bool updateBeamElement=false, RayTracingProcessListener *listener=nullptr, bool clear=true, const struct timeval *startTime=nullptr, bool clearIntermediate=true)
 
bool traceDiffraction (std::string const &path, std::list< RZ::Ray > const &rays, RayTracingProcessListener *listener=nullptr, bool clear=true, const struct timeval *startTime=nullptr)
 
bool traceDefault (std::list< RZ::Ray > const &rays, bool updateBeamElement=false, RayTracingProcessListener *listener=nullptr, bool clear=true, const struct timeval *startTime=nullptr)
 
bool traceNonSequential (std::list< RZ::Ray > const &rays, bool updateBeamElement=false, RayTracingProcessListener *listener=nullptr, bool clear=true, const struct timeval *startTime=nullptr, bool clearIntermediate=true, uint32_t maxProps=3000)
 
struct timeval lastTracerTick () const
 
bool savePNG (std::string const &detector, std::string const &file)
 

Static Public Member Functions

static void addSkyBeam (std::list< Ray > &dest, unsigned int number=1000, Real radius=.5, Real azimuth=0, Real elevation=90, Real distance=10, uint32_t id=0, bool random=true)
 
static void addElementRelativeBeam (std::list< Ray > &dest, Element *element, unsigned int number=1000, Real radius=.5, Real azimuth=0, Real elevation=90, Real offX=0, Real offY=0, Real distance=10, uint32_t id=0, bool random=true)
 
static void addElementRelativeFocusBeam (std::list< Ray > &dest, Element *element, unsigned int number=1000, Real radius=.5, Real fNum=17.37, Real refAperture=200e-3, Real azimuth=0, Real elevation=90, Real offX=0, Real offY=0, Real distance=10, uint32_t id=0, bool random=true)
 
static void addFocalPlaneFocusedBeam (std::list< Ray > &dest, const ReferenceFrame *focalPlane, unsigned int number=1000, Real fNum=17.37, Real azimuth=0, Real elevation=90, Real offX=0, Real offY=0, Real distance=10, uint32_t id=0, bool random=true, Real offZ=0)
 
static void addBeam (std::list< Ray > &dest, BeamProperties const &)
 

Protected Member Functions

EvaluatedParametermakeParameter (std::string const &, std::string const &)
 
std::string genElementName (std::string const &type)
 
std::string genReferenceFrameName (std::string const &type)
 
bool registerDetectorAlias (std::string const &name, Detector *)
 

Friends

struct ReferenceFrameContext
 

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