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