6 #include <SurveyPlayback.h> 8 #include <noise/RandomnessGenerator.h> 9 #include <PyPlatformWrapper.h> 10 #include <PySceneWrapper.h> 11 #include <PyHeliosOutputWrapper.h> 12 #include <PyHeliosException.h> 13 #include <XmlSurveyLoader.h> 25 std::shared_ptr<XmlSurveyLoader> xmlreader =
nullptr;
29 bool finished =
false;
30 size_t numThreads = 0;
31 size_t simFrequency = 0;
32 std::string surveyPath =
"NULL";
33 std::string assetsPath =
"NULL";
34 std::string outputPath =
"NULL";
35 std::shared_ptr<Survey> survey =
nullptr;
36 std::shared_ptr<SurveyPlayback> playback =
nullptr;
37 boost::thread * thread =
nullptr;
38 std::shared_ptr<PySimulationCycleCallback> callback =
nullptr;
39 bool lasOutput =
false;
40 bool zipOutput =
false;
42 bool finalOutput =
true;
43 bool exportToFile =
true;
58 std::string surveyPath,
59 std::string assetsPath =
"assets/",
60 std::string outputPath =
"output/",
61 size_t numThreads = 0,
62 bool lasOutput =
false,
63 bool zipOutput =
false 144 Leg &
getLeg(
int index) {
return *(survey->legs[index]);}
151 {survey->legs.erase(survey->legs.begin() + index);}
178 {this->simFrequency = simFrequency;}
187 playback->callback =
nullptr;
188 survey->scanner->cycleMeasurements =
nullptr;
189 survey->scanner->cycleMeasurementsMutex =
nullptr;
191 void setLasOutput(
double lasOutput){
193 "Cannot modify LAS output flag for already started simulations." 195 this->lasOutput = lasOutput;
197 double getLasOutput(){
return lasOutput;}
198 double getZipOutput(){
return zipOutput;}
199 void setZipOutput(
bool zipOutput){
201 "Cannot modify ZIP output flag for already started simulations." 203 this->zipOutput = zipOutput;
245 bool legNoiseDisabled =
false,
246 bool rebuildScene =
false,
247 bool writeWaveform =
false,
248 bool calcEchowidth =
false,
249 bool fullWaveNoise =
false,
250 bool platformNoiseDisabled =
true 252 void addRotateFilter(
259 void addScaleFilter(
double scaleFactor, std::string partId);
260 void addTranslateFilter(
double x,
double y,
double z, std::string partId);
void start()
Start the simulation if possible. Otherwise, PyHeliosException will be thrown.
Definition: PyHeliosSimulation.cpp:49
std::string getSurveyPath()
Obtain the survey path used by the simulation.
Definition: PyHeliosSimulation.h:104
bool isRunning()
Check if the simulation is running or not.
Definition: PyHeliosSimulation.cpp:140
Leg & getLeg(int index)
Obtain leg at given index.
Definition: PyHeliosSimulation.h:144
bool isFinished()
Check if the simulation has finished or not.
Definition: PyHeliosSimulation.cpp:136
Definition: PyHeliosException.h:12
PyPlatformWrapper * getPlatform()
Obtain the platform used by the simulation.
Definition: PyHeliosSimulation.h:129
Leg & newLeg(int index)
Create a new empty leg.
Definition: PyHeliosSimulation.cpp:35
bool isPaused()
Check if the simulation has been paused or not.
Definition: PyHeliosSimulation.h:80
PyHeliosOutputWrapper * join()
Cause caller thread to wait until simulation has finished.
Definition: PyHeliosSimulation.cpp:145
Definition: PyHeliosSimulation.h:21
void setSimFrequency(size_t simFrequency)
Set the simulation frequency.
Definition: PyHeliosSimulation.h:177
size_t getNumThreads()
Obtain the number of threads.
Definition: PyHeliosSimulation.h:169
bool isStopped()
Check if the simulation has been stopped or not.
Definition: PyHeliosSimulation.h:86
Scanner & getScanner()
Obtain the scanner used by the simulation.
Definition: PyHeliosSimulation.h:123
void loadSurvey(bool legNoiseDisabled=false, bool rebuildScene=false, bool writeWaveform=false, bool calcEchowidth=false, bool fullWaveNoise=false, bool platformNoiseDisabled=true)
Load a survey XML file.
Definition: PyHeliosSimulation.cpp:187
std::string getAssetsPath()
Obtain the path to assets directory used by the simulation.
Definition: PyHeliosSimulation.h:110
size_t getSimFrequency()
Obtain simulation frequency.
Definition: PyHeliosSimulation.h:163
void setCallback(PyObject *pyCallback)
Set the simulation callback to specified python object functor.
Definition: PyHeliosSimulation.cpp:257
Class representing a scanner asset.
Definition: Scanner.h:31
Class representing a Helios++ survey.
Definition: Survey.h:11
bool isStarted()
Check if the simulation has been started or not.
Definition: PyHeliosSimulation.h:74
void pause()
Pause the simulation if possible. Otherwise, PyHeliosException will be thrown.
Definition: PyHeliosSimulation.cpp:86
void clearCallback()
Clear simulation callback so it will no longer be invoked.
Definition: PyHeliosSimulation.h:186
Class representing a survey leg.
Definition: Leg.h:11
void setNumThreads(size_t numThreads)
Set the number of threads.
Definition: PyHeliosSimulation.h:173
void stop()
Stop the simulation if possible. Otherwise, PyHeliosException will be thrown.
Definition: PyHeliosSimulation.cpp:101
void removeLeg(int index)
Remove leg at given index.
Definition: PyHeliosSimulation.h:150
Python wrapper for helios output.
Definition: PyHeliosOutputWrapper.h:16
int getNumLegs()
Obtain the number of legs.
Definition: PyHeliosSimulation.h:138
void resume()
Resume the simulation if possible. Otherwise, PyHeliosException will be thrown.
Definition: PyHeliosSimulation.cpp:116
Survey & getSurvey()
Obtain the survey used by the simulation.
Definition: PyHeliosSimulation.h:117
Wrapper for Scene.
Definition: PySceneWrapper.h:22