#include <Inventor/Win/SoWin.h> #include <Inventor/Win/viewers/SoWinExaminerViewer.h> #include <Inventor/nodes/SoSeparator.h> int main(int , char ** argv) { HWND window=SoWin::init(argv[0]); if(!window)exit(1); SoSeparator *root=new SoSeparator; root->ref(); SoInput myInput; if(!myInput.openFile("huatuo.iv"))exit(1); SoSeparator *fileContents=SoDB::readAll(&myInput); if(fileContents==NULL)exit(1); root->addChild(fileContents); SoWinExaminerViewer *viewer=new SoWinExaminerViewer(window); viewer->setSceneGraph(root); viewer->setBackgroundColor(SbColor(1,1,1)); viewer->setTitle("iv"); viewer->show(); SoWin::show(window); SoWin::mainLoop(); return 0; }