Initialize Engine with Environment Filename

In BioGears_2.0.0-alpha.3400, the BioGearsEngine class had an InitializeEngine method that took an environment filename as a parameter:

virtual bool InitializeEngine(const char *patientFilename, const char *environmentFilename, std::vector* conditions = NULL) = 0;

In BioGears_3.0.0-alpha.4000, the method no longer takes the environment filename:

virtual bool InitializeEngine(const char *patientFilename, const std::vector* conditions = nullptr) = 0;

Is there an easy way to initialize the BioGears engine with a particular environment file, or is there some reason that this is no longer feasible?


  • abrayabray Entry Level
    Yes, you create a condition

    You can do it like this:

    #include "system/environment/conditions/SEInitialEnvironment.h"

    SEInitialEnvironment env(bg->GetSubstanceManager());
    env.SetConditionsFile("./InitialEnvironment.xml");// You can give it a file, or set the values on the condition itself
    std::vector<const SECondition*> conditions;

    if (!bg->InitializeEngine("Standard.xml", &conditions))
    std::cerr << "Could not load initialize engine, check the error" << std::endl;
Sign In or Register to comment.