[59] | 1 | #include "VisibilityEnvironment.h"
|
---|
[870] | 2 | #include "common.h"
|
---|
| 3 | #include "Environment.h"
|
---|
[59] | 4 |
|
---|
[870] | 5 |
|
---|
[59] | 6 | namespace GtpVisibility {
|
---|
[100] | 7 |
|
---|
[74] | 8 | //-----------------------------------------------------------------------
|
---|
[59] | 9 | VisibilityEnvironment::VisibilityEnvironment()
|
---|
| 10 | {
|
---|
[971] | 11 | // HACK: loading debug stream should not happen here
|
---|
[870] | 12 | GtpVisibilityPreprocessor::Debug.open("debug.log");
|
---|
[938] | 13 | // load environment
|
---|
[1004] | 14 | //Environment::GetSingleton() = new GtpVisibilityPreprocessor::Environment::GetSingleton();
|
---|
[59] | 15 | }
|
---|
[938] | 16 | //-----------------------------------------------------------------------
|
---|
[870] | 17 | VisibilityEnvironment::~VisibilityEnvironment()
|
---|
| 18 | {
|
---|
[1004] | 19 | GtpVisibilityPreprocessor::Environment::DelSingleton();
|
---|
[870] | 20 | }
|
---|
[74] | 21 | //-----------------------------------------------------------------------
|
---|
[938] | 22 | bool VisibilityEnvironment::LoadEnvironment(string filename)
|
---|
[971] | 23 | {
|
---|
[944] | 24 | //-- parse environment
|
---|
[1004] | 25 | return GtpVisibilityPreprocessor::Environment::GetSingleton()->ReadEnvFile(filename.c_str());
|
---|
[59] | 26 | }
|
---|
[925] | 27 | //-----------------------------------------------------------------------
|
---|
| 28 | std::string VisibilityEnvironment::getSceneFileName()
|
---|
| 29 | {
|
---|
| 30 | char str[200];
|
---|
[1004] | 31 | GtpVisibilityPreprocessor::Environment::GetSingleton()->GetStringValue("Scene.filename", str);
|
---|
[925] | 32 | return str;
|
---|
| 33 | }
|
---|
| 34 | //-----------------------------------------------------------------------
|
---|
| 35 | std::string VisibilityEnvironment::getViewCellsFileName()
|
---|
| 36 | {
|
---|
| 37 | char str[200];
|
---|
[1004] | 38 | GtpVisibilityPreprocessor::Environment::GetSingleton()->GetStringValue("ViewCells.filename", str);
|
---|
| 39 |
|
---|
[925] | 40 | return str;
|
---|
| 41 | }
|
---|
[938] | 42 | //-----------------------------------------------------------------------
|
---|
| 43 | GtpVisibilityPreprocessor::Environment *VisibilityEnvironment::GetPreprocessorEnvironment()
|
---|
| 44 | {
|
---|
[1004] | 45 | return GtpVisibilityPreprocessor::Environment::GetSingleton();
|
---|
[938] | 46 | }
|
---|
[59] | 47 | } // namespace GtpVisibility
|
---|