Helios++
Helios software for LiDAR simulations
PulseTaskFactory Class Reference

Factory to make the adequate pulse task depending on the simulation. More...

#include <PulseTaskFactory.h>

Collaboration diagram for PulseTaskFactory:

Public Member Functions

 PulseTaskFactory (Scene &scene)
 Constructor for the PulseTaskFactory. More...
 
shared_ptr< PulseTaskbuild (ScanningPulseProcess const &spp, SimulatedPulse const &sp) const
 The main build method of the factory. It is the method that must be called to automatically build the adequate type of PulseTask. More...
 
ScenegetScene () const
 Obtain the scene associated to the pulse task factory. More...
 
void setScene (Scene &scene)
 Set the scene associated to the pulse task factory. More...
 

Protected Member Functions

shared_ptr< PulseTaskbuildFullWaveformPulseRunnable (ScanningPulseProcess const &spp, SimulatedPulse const &sp) const
 Build a FullWaveformPulseRunnable from given arguments. More...
 
shared_ptr< PulseTaskbuildDynFullWaveformPulseRunnable (ScanningPulseProcess const &spp, SimulatedPulse const &sp) const
 Build a DynFullWaveformPulseRunnable from given arguments. More...
 
virtual void configureBuildMethod ()
 Automatically set the _build function depending on current factory state. More...
 

Protected Attributes

Scenescene
 Reference to the scene to be scanned.
 
std::function< shared_ptr< PulseTask > ScanningPulseProcess const &, SimulatedPulse const &)> _build
 The build function to be used. More...
 

Detailed Description

Factory to make the adequate pulse task depending on the simulation.

Author
Alberto M. Esmoris Pena
Version
1.0
See also
PulseTask
FullWaveformPulseRunnable
DynFullWaveformPulseRunnable

Constructor & Destructor Documentation

◆ PulseTaskFactory()

PulseTaskFactory::PulseTaskFactory ( Scene scene)

Constructor for the PulseTaskFactory.

See also
PulseTaskFactory::scene

Member Function Documentation

◆ build()

shared_ptr<PulseTask> PulseTaskFactory::build ( ScanningPulseProcess const &  spp,
SimulatedPulse const &  sp 
) const
inline

The main build method of the factory. It is the method that must be called to automatically build the adequate type of PulseTask.

Returns
Built pulse task
See also
PulseTask

◆ buildDynFullWaveformPulseRunnable()

shared_ptr< PulseTask > PulseTaskFactory::buildDynFullWaveformPulseRunnable ( ScanningPulseProcess const &  spp,
SimulatedPulse const &  sp 
) const
protected

Build a DynFullWaveformPulseRunnable from given arguments.

See also
PulseTaskFactory::build

◆ buildFullWaveformPulseRunnable()

shared_ptr< PulseTask > PulseTaskFactory::buildFullWaveformPulseRunnable ( ScanningPulseProcess const &  spp,
SimulatedPulse const &  sp 
) const
protected

Build a FullWaveformPulseRunnable from given arguments.

See also
PulseTaskFactory::build

◆ configureBuildMethod()

void PulseTaskFactory::configureBuildMethod ( )
protectedvirtual

Automatically set the _build function depending on current factory state.

See also
PulseTaskFactory::_build

◆ getScene()

Scene& PulseTaskFactory::getScene ( ) const
inline

Obtain the scene associated to the pulse task factory.

Returns
Scene associated to the pulse task factory
See also
PulseTaskFactory::scene

◆ setScene()

void PulseTaskFactory::setScene ( Scene scene)
inline

Set the scene associated to the pulse task factory.

Parameters
sceneScene associated to the pulse task factory
See also
PulseTaskFactory::scene

Member Data Documentation

◆ _build

std::function<shared_ptr<PulseTask> ScanningPulseProcess const &, SimulatedPulse const & )> PulseTaskFactory::_build
protected

The build function to be used.

It depends on the simulation. For instance, if there are dynamic moving objects, it will build a DynFullWaveformPulseRunnable. But if there is no dynamic object at all, then a FullWaveformPulseRunnable will be built.


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