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

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

update for ogre 1.2
OcclusionCullingSceneManager? is the only scenemanager in the solution now

RevLine 
[59]1#include "VisibilityEnvironment.h"
[870]2#include "common.h"
3#include "Environment.h"
[59]4
[870]5
[59]6namespace GtpVisibility {
[100]7
[74]8//-----------------------------------------------------------------------
[59]9VisibilityEnvironment::VisibilityEnvironment()
10{
[870]11        // load debug stream
12        GtpVisibilityPreprocessor::Debug.open("debug.log");
13         
[59]14}
[870]15VisibilityEnvironment::~VisibilityEnvironment()
16{
17        // load debug stream
18        DEL_PTR(GtpVisibilityPreprocessor::environment);
19         
20}
[74]21//-----------------------------------------------------------------------
[870]22void VisibilityEnvironment::LoadEnvironment(string filename)
[59]23{
[870]24        // todo matt:
25        GtpVisibilityPreprocessor::environment = new GtpVisibilityPreprocessor::Environment;
26       
27        char argc = 2;
28        char *argv[2];
29        argv[0] = "";
30       
31        char fname[200];
32        sprintf(fname, "%s", filename.c_str());
33        argv[1] = fname;
34
35        GtpVisibilityPreprocessor::Debug << "filename: " << argv[1] << endl;
36
37        GtpVisibilityPreprocessor::environment->Parse(argc, argv, false);
38        //MeshKdTree::ParseEnvironment();
[59]39}
[925]40//-----------------------------------------------------------------------
41std::string VisibilityEnvironment::getSceneFileName()
42{
43        char str[200];
44        GtpVisibilityPreprocessor::environment->GetStringValue("Scene.filename", str);
45        return str;
46}
47//-----------------------------------------------------------------------
48std::string VisibilityEnvironment::getViewCellsFileName()
49{
50        char str[200];
51        GtpVisibilityPreprocessor::environment->GetStringValue("ViewCells.filename", str);
52        return str;
53}
[59]54
55} // namespace GtpVisibility
Note: See TracBrowser for help on using the repository browser.