[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 | //DEL_PTR(Environment::GetSingleton());
|
---|
| 20 | GtpVisibilityPreprocessor::Environment::DelSingleton();
|
---|
[870] | 21 | }
|
---|
[74] | 22 | //-----------------------------------------------------------------------
|
---|
[938] | 23 | bool VisibilityEnvironment::LoadEnvironment(string filename)
|
---|
[971] | 24 | {
|
---|
[944] | 25 | //-- parse environment
|
---|
[1004] | 26 | return GtpVisibilityPreprocessor::Environment::GetSingleton()->ReadEnvFile(filename.c_str());
|
---|
[59] | 27 | }
|
---|
[925] | 28 | //-----------------------------------------------------------------------
|
---|
| 29 | std::string VisibilityEnvironment::getSceneFileName()
|
---|
| 30 | {
|
---|
| 31 | char str[200];
|
---|
[1004] | 32 | GtpVisibilityPreprocessor::Environment::GetSingleton()->GetStringValue("Scene.filename", str);
|
---|
[925] | 33 | return str;
|
---|
| 34 | }
|
---|
| 35 | //-----------------------------------------------------------------------
|
---|
| 36 | std::string VisibilityEnvironment::getViewCellsFileName()
|
---|
| 37 | {
|
---|
| 38 | char str[200];
|
---|
[1004] | 39 | GtpVisibilityPreprocessor::Environment::GetSingleton()->GetStringValue("ViewCells.filename", str);
|
---|
| 40 |
|
---|
[925] | 41 | return str;
|
---|
| 42 | }
|
---|
[938] | 43 | //-----------------------------------------------------------------------
|
---|
| 44 | GtpVisibilityPreprocessor::Environment *VisibilityEnvironment::GetPreprocessorEnvironment()
|
---|
| 45 | {
|
---|
[1004] | 46 | return GtpVisibilityPreprocessor::Environment::GetSingleton();
|
---|
[938] | 47 | }
|
---|
[59] | 48 | } // namespace GtpVisibility
|
---|