source: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityEnvironment.cpp @ 971

Revision 971, 1.5 KB checked in by mattausch, 18 years ago (diff)

added stuff for view cell ziping (not working yet!)

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