Hi,
I've a problem with OpenSG2 SceneFileHandler stl-modelloading.
In release mode everything is fine, in debug mode I get something from
the read function, but the volume values are always wrong.
Here is a small example:
int main(int argc, char **argv)
{
// Init the OpenSG subsystem
osgInit(argc,argv);
preloadSharedObject("OSGFileIO");
preloadSharedObject("OSGImageFileIO");
{
int winid = setupGLUT(&argc, argv);
GLUTWindowRecPtr gwin = GLUTWindow::create();
gwin->setGlutId(winid);
gwin->init();
NodeRefPtr n = SceneFileHandler::the()->read("3D-ScanII.stl");
if(!n)
std::cout << "error: no mesh loaded" << std::endl;
mgr = new SimpleSceneManager;
mgr->setWindow(gwin);
mgr->setRoot(n);
mgr->showAll();
const BoxVolume &vol = n->getVolume();
Pnt3f volMin, volMax;
vol.getBounds(volMin, volMax);
std::cout << volMin << std::endl;
std::cout << volMax << std::endl;
}
glutMainLoop();
return 0;
}
Here's the output:
Release:
-5.35074, -80.7023, 1.59258
67.8868, -17.9534, 20.4607
Debug:
-1.07374e+008, -1.07374e+008, -1.07374e+008
67.8868, -17.9534, 20.4607
The volMin output for debug is always the same, also for other meshes.
I don't have this problem for other fileformats, .obj for example.
I'm using Visual Studio 9 with an OpenSG2 build from the end of juni.
Did I miss something or is this a bug?
I'm glad for any input on that issue.
Thanks for your help
regards,
Bastian
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users