Replaced .osg with .osgt file usage
This commit is contained in:
parent
2c2234d68b
commit
d18250da59
@ -147,7 +147,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
|
|||||||
|
|
||||||
osg::Group* model = new osg::Group;
|
osg::Group* model = new osg::Group;
|
||||||
|
|
||||||
osg::Node* glider = osgDB::readNodeFile("glider.osg");
|
osg::Node* glider = osgDB::readNodeFile("glider.osgt");
|
||||||
if (glider)
|
if (glider)
|
||||||
{
|
{
|
||||||
const osg::BoundingSphere& bs = glider->getBound();
|
const osg::BoundingSphere& bs = glider->getBound();
|
||||||
@ -168,7 +168,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
|
|||||||
model->addChild(xform);
|
model->addChild(xform);
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Node* cessna = osgDB::readNodeFile("cessna.osg");
|
osg::Node* cessna = osgDB::readNodeFile("cessna.osgt");
|
||||||
if (cessna)
|
if (cessna)
|
||||||
{
|
{
|
||||||
const osg::BoundingSphere& bs = cessna->getBound();
|
const osg::BoundingSphere& bs = cessna->getBound();
|
||||||
|
@ -142,7 +142,7 @@ int main( int argc, char **argv )
|
|||||||
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
|
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!loadedModel) loadedModel = osgDB::readNodeFile("cessnafire.osg");
|
if (!loadedModel) loadedModel = osgDB::readNodeFile("cessnafire.osgt");
|
||||||
|
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
{
|
{
|
||||||
|
@ -172,7 +172,7 @@ int main( int argc, char **argv )
|
|||||||
osg::Node* rootnode = osgDB::readNodeFiles(arguments);
|
osg::Node* rootnode = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!rootnode) rootnode = osgDB::readNodeFile("cow.osg");
|
if (!rootnode) rootnode = osgDB::readNodeFile("cow.osgt");
|
||||||
|
|
||||||
if (!rootnode)
|
if (!rootnode)
|
||||||
{
|
{
|
||||||
|
@ -331,7 +331,7 @@ int main( int argc, char **argv )
|
|||||||
// load the scene.
|
// load the scene.
|
||||||
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
|
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osg");
|
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osgt");
|
||||||
|
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
{
|
{
|
||||||
|
@ -1440,7 +1440,7 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
rootNode->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
|
rootNode->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
|
||||||
|
|
||||||
//osgDB::writeNodeFile(*rootNode,"test.osg");
|
//osgDB::writeNodeFile(*rootNode,"test.osgt");
|
||||||
|
|
||||||
// for some reason osgcatch is hanging on exit inside the new TextureObject clean up code when the it's
|
// for some reason osgcatch is hanging on exit inside the new TextureObject clean up code when the it's
|
||||||
// run as multi-threaded view, switching to SingleThreaded cures this.
|
// run as multi-threaded view, switching to SingleThreaded cures this.
|
||||||
|
@ -121,7 +121,7 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osg");
|
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osgt");
|
||||||
|
|
||||||
|
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
|
@ -150,7 +150,7 @@ int main( int argc, char **argv )
|
|||||||
{
|
{
|
||||||
osgViewer::View* view = new osgViewer::View;
|
osgViewer::View* view = new osgViewer::View;
|
||||||
view->setName("Single view");
|
view->setName("Single view");
|
||||||
view->setSceneData(osgDB::readNodeFile("fountain.osg"));
|
view->setSceneData(osgDB::readNodeFile("fountain.osgt"));
|
||||||
|
|
||||||
view->addEventHandler( new osgViewer::StatsHandler );
|
view->addEventHandler( new osgViewer::StatsHandler );
|
||||||
|
|
||||||
@ -284,7 +284,7 @@ int main( int argc, char **argv )
|
|||||||
view->setName("View three");
|
view->setName("View three");
|
||||||
viewer.addView(view);
|
viewer.addView(view);
|
||||||
|
|
||||||
view->setSceneData(osgDB::readNodeFile("cessnafire.osg"));
|
view->setSceneData(osgDB::readNodeFile("cessnafire.osgt"));
|
||||||
|
|
||||||
view->getCamera()->setName("Cam three");
|
view->getCamera()->setName("Cam three");
|
||||||
view->getCamera()->setProjectionMatrixAsPerspective(30.0, double(traits->width) / double(traits->height/2), 1.0, 1000.0);
|
view->getCamera()->setProjectionMatrixAsPerspective(30.0, double(traits->width) / double(traits->height/2), 1.0, 1000.0);
|
||||||
|
@ -234,17 +234,17 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
// write out the various scene graphs so that they can be browsed, either
|
// write out the various scene graphs so that they can be browsed, either
|
||||||
// in an editor or using a graphics diff tool gdiff/xdiff/xxdiff.
|
// in an editor or using a graphics diff tool gdiff/xdiff/xxdiff.
|
||||||
std::cout << std::endl << "Writing out the original scene graph as 'original.osg'"<<std::endl;
|
std::cout << std::endl << "Writing out the original scene graph as 'original.osgt'"<<std::endl;
|
||||||
osgDB::writeNodeFile(*rootnode,"original.osg");
|
osgDB::writeNodeFile(*rootnode,"original.osgt");
|
||||||
|
|
||||||
std::cout << std::endl << "Writing out the graph preserving scene graph as 'graph_copy.osg'"<<std::endl;
|
std::cout << std::endl << "Writing out the graph preserving scene graph as 'graph_copy.osgt'"<<std::endl;
|
||||||
osgDB::writeNodeFile(*graph_copy,"graph_copy.osg");
|
osgDB::writeNodeFile(*graph_copy,"graph_copy.osgt");
|
||||||
|
|
||||||
std::cout << "Writing out the deep copied scene graph as 'deep_copy.osg'"<<std::endl;
|
std::cout << "Writing out the deep copied scene graph as 'deep_copy.osgt'"<<std::endl;
|
||||||
osgDB::writeNodeFile(*deep_copy,"deep_copy.osg");
|
osgDB::writeNodeFile(*deep_copy,"deep_copy.osgt");
|
||||||
|
|
||||||
std::cout << "Writing out the shallow copied scene graph as 'shallow_copy.osg'"<<std::endl;
|
std::cout << "Writing out the shallow copied scene graph as 'shallow_copy.osgt'"<<std::endl;
|
||||||
osgDB::writeNodeFile(*shallow_copy,"shallow_copy.osg");
|
osgDB::writeNodeFile(*shallow_copy,"shallow_copy.osgt");
|
||||||
|
|
||||||
|
|
||||||
// You can use a bit mask to control which parts of the scene graph are shallow copied
|
// You can use a bit mask to control which parts of the scene graph are shallow copied
|
||||||
|
@ -98,7 +98,7 @@ int main(int argc, char *argv[])
|
|||||||
osg::Node* rootnode = osgDB::readNodeFiles(arguments);
|
osg::Node* rootnode = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!rootnode) rootnode = osgDB::readNodeFile("cessna.osg");
|
if (!rootnode) rootnode = osgDB::readNodeFile("cessna.osgt");
|
||||||
|
|
||||||
if (!rootnode)
|
if (!rootnode)
|
||||||
{
|
{
|
||||||
|
@ -97,7 +97,7 @@ int main( int argc, char** argv )
|
|||||||
{
|
{
|
||||||
osg::ArgumentParser arguments( &argc, argv );
|
osg::ArgumentParser arguments( &argc, argv );
|
||||||
osg::Node* model = osgDB::readNodeFiles( arguments );
|
osg::Node* model = osgDB::readNodeFiles( arguments );
|
||||||
if ( !model ) model = osgDB::readNodeFile( "cow.osg" );
|
if ( !model ) model = osgDB::readNodeFile( "cow.osgt" );
|
||||||
if ( !model )
|
if ( !model )
|
||||||
{
|
{
|
||||||
std::cout << arguments.getApplicationName() <<": No data loaded" << std::endl;
|
std::cout << arguments.getApplicationName() <<": No data loaded" << std::endl;
|
||||||
|
@ -669,7 +669,7 @@ int main(int argc, char** argv)
|
|||||||
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
|
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osg");
|
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osgt");
|
||||||
|
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
{
|
{
|
||||||
|
@ -142,7 +142,7 @@ int main( int argc, char **argv )
|
|||||||
osg::ref_ptr< osg::StateSet > ss = createStateSet();
|
osg::ref_ptr< osg::StateSet > ss = createStateSet();
|
||||||
geode->setStateSet( ss.get() );
|
geode->setStateSet( ss.get() );
|
||||||
|
|
||||||
// osgDB::writeNodeFile(*geode, "instanced.osg");
|
// osgDB::writeNodeFile(*geode, "instanced.osgt");
|
||||||
|
|
||||||
osgViewer::Viewer viewer(arguments);
|
osgViewer::Viewer viewer(arguments);
|
||||||
viewer.setSceneData( geode.get() );
|
viewer.setSceneData( geode.get() );
|
||||||
|
@ -94,8 +94,8 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (ea.getKey() == 'x') {
|
if (ea.getKey() == 'x') {
|
||||||
osgDB::writeNodeFile(*ep_->getRoot(), "osgfx_model.osg");
|
osgDB::writeNodeFile(*ep_->getRoot(), "osgfx_model.osgt");
|
||||||
std::cout << "written nodes to \"osgfx_model.osg\"\n";
|
std::cout << "written nodes to \"osgfx_model.osgt\"\n";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (ea.getKey() == 'r') {
|
if (ea.getKey() == 'r') {
|
||||||
@ -339,7 +339,7 @@ int main(int argc, char *argv[])
|
|||||||
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
|
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!loadedModel) loadedModel = osgDB::readNodeFile("dumptruck.osg");
|
if (!loadedModel) loadedModel = osgDB::readNodeFile("dumptruck.osgt");
|
||||||
|
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
{
|
{
|
||||||
|
@ -666,7 +666,7 @@ int main(int, char **)
|
|||||||
root->addChild( createScene() );
|
root->addChild( createScene() );
|
||||||
root->addChild( createBackground() );
|
root->addChild( createBackground() );
|
||||||
|
|
||||||
//osgDB::writeNodeFile(*root,"geoemtry.osg");
|
//osgDB::writeNodeFile(*root,"geoemtry.osgt");
|
||||||
|
|
||||||
osgViewer::Viewer viewer;
|
osgViewer::Viewer viewer;
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ int main( int argc, char **argv )
|
|||||||
osg::ref_ptr<osg::Node> scene = osgDB::readNodeFiles(arguments);
|
osg::ref_ptr<osg::Node> scene = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default model instead.
|
// if not loaded assume no arguments passed in, try use default model instead.
|
||||||
if (!scene) scene = osgDB::readNodeFile("dumptruck.osg");
|
if (!scene) scene = osgDB::readNodeFile("dumptruck.osgt");
|
||||||
|
|
||||||
|
|
||||||
if (!scene)
|
if (!scene)
|
||||||
|
@ -142,8 +142,8 @@ public:
|
|||||||
}
|
}
|
||||||
else if (ea.getKey()=='o')
|
else if (ea.getKey()=='o')
|
||||||
{
|
{
|
||||||
osg::notify(osg::NOTICE)<<"Saved model to file 'saved_model.osg'"<<std::endl;
|
osg::notify(osg::NOTICE)<<"Saved model to file 'saved_model.osgt'"<<std::endl;
|
||||||
osgDB::writeNodeFile(*(viewer->getSceneData()), "saved_model.osg");
|
osgDB::writeNodeFile(*(viewer->getSceneData()), "saved_model.osgt");
|
||||||
}
|
}
|
||||||
else if (ea.getKey()=='p')
|
else if (ea.getKey()=='p')
|
||||||
{
|
{
|
||||||
@ -325,8 +325,8 @@ public:
|
|||||||
|
|
||||||
if (cmtsv._group->getNumChildren()>0)
|
if (cmtsv._group->getNumChildren()>0)
|
||||||
{
|
{
|
||||||
std::cout<<"Writing selected compoents to 'selected_model.osg'"<<std::endl;
|
std::cout<<"Writing selected compoents to 'selected_model.osgt'"<<std::endl;
|
||||||
osgDB::writeNodeFile(*cmtsv._group, "selected_model.osg");
|
osgDB::writeNodeFile(*cmtsv._group, "selected_model.osgt");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -345,7 +345,7 @@ int main( int argc, char **argv )
|
|||||||
if (argc>1) loadedModel = osgDB::readNodeFile(argv[1]);
|
if (argc>1) loadedModel = osgDB::readNodeFile(argv[1]);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!loadedModel) loadedModel = osgDB::readNodeFile("dumptruck.osg");
|
if (!loadedModel) loadedModel = osgDB::readNodeFile("dumptruck.osgt");
|
||||||
|
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
{
|
{
|
||||||
|
@ -327,7 +327,7 @@ int main( int argc, char **argv )
|
|||||||
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
|
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!loadedModel) loadedModel = osgDB::readNodeFile("glider.osg");
|
if (!loadedModel) loadedModel = osgDB::readNodeFile("glider.osgt");
|
||||||
|
|
||||||
// create a room made of foor walls, a floor, a roof, and swinging light fitting.
|
// create a room made of foor walls, a floor, a roof, and swinging light fitting.
|
||||||
osg::Node* rootnode = createRoom(loadedModel);
|
osg::Node* rootnode = createRoom(loadedModel);
|
||||||
|
@ -145,7 +145,7 @@ int main( int argc, char **argv )
|
|||||||
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
|
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!loadedModel) loadedModel = osgDB::readNodeFile("glider.osg");
|
if (!loadedModel) loadedModel = osgDB::readNodeFile("glider.osgt");
|
||||||
|
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
{
|
{
|
||||||
|
@ -98,7 +98,7 @@ int main( int argc, char **argv )
|
|||||||
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
|
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osg");
|
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osgt");
|
||||||
|
|
||||||
// if no model has been successfully loaded report failure.
|
// if no model has been successfully loaded report failure.
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
|
@ -47,7 +47,7 @@ int main( int argc, char **argv )
|
|||||||
osg::Node* rootnode = osgDB::readNodeFiles(arguments);
|
osg::Node* rootnode = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!rootnode) rootnode = osgDB::readNodeFile("cessnafire.osg");
|
if (!rootnode) rootnode = osgDB::readNodeFile("cessnafire.osgt");
|
||||||
|
|
||||||
if (!rootnode)
|
if (!rootnode)
|
||||||
{
|
{
|
||||||
|
@ -91,8 +91,8 @@ bool OccluderEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAct
|
|||||||
if (_occluders.valid())
|
if (_occluders.valid())
|
||||||
{
|
{
|
||||||
|
|
||||||
if (osgDB::writeNodeFile(*_occluders,"saved_occluders.osg"))
|
if (osgDB::writeNodeFile(*_occluders,"saved_occluders.osgt"))
|
||||||
std::cout<<"saved occluders to 'saved_occluders.osg'"<<std::endl;
|
std::cout<<"saved occluders to 'saved_occluders.osgt'"<<std::endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -315,7 +315,7 @@ int main( int argc, char **argv )
|
|||||||
osg::Node* loadedmodel = osgDB::readNodeFiles(arguments);
|
osg::Node* loadedmodel = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try using default mode instead.
|
// if not loaded assume no arguments passed in, try using default mode instead.
|
||||||
if (!loadedmodel) loadedmodel = osgDB::readNodeFile("glider.osg");
|
if (!loadedmodel) loadedmodel = osgDB::readNodeFile("glider.osgt");
|
||||||
|
|
||||||
if (!loadedmodel)
|
if (!loadedmodel)
|
||||||
{
|
{
|
||||||
|
@ -24,7 +24,7 @@ int main(int argc, char** argv)
|
|||||||
while (arguments.read("--testOcclusion")) { testOcclusion = true; }
|
while (arguments.read("--testOcclusion")) { testOcclusion = true; }
|
||||||
|
|
||||||
// load outlined object
|
// load outlined object
|
||||||
std::string modelFilename = arguments.argc() > 1 ? arguments[1] : "dumptruck.osg";
|
std::string modelFilename = arguments.argc() > 1 ? arguments[1] : "dumptruck.osgt";
|
||||||
osg::ref_ptr<osg::Node> outlineModel = osgDB::readNodeFile(modelFilename);
|
osg::ref_ptr<osg::Node> outlineModel = osgDB::readNodeFile(modelFilename);
|
||||||
if (!outlineModel)
|
if (!outlineModel)
|
||||||
{
|
{
|
||||||
@ -48,7 +48,7 @@ int main(int argc, char** argv)
|
|||||||
if (testOcclusion)
|
if (testOcclusion)
|
||||||
{
|
{
|
||||||
// load occluder
|
// load occluder
|
||||||
std::string occludedModelFilename = "cow.osg";
|
std::string occludedModelFilename = "cow.osgt";
|
||||||
osg::ref_ptr<osg::Node> occludedModel = osgDB::readNodeFile(occludedModelFilename);
|
osg::ref_ptr<osg::Node> occludedModel = osgDB::readNodeFile(occludedModelFilename);
|
||||||
if (!occludedModel)
|
if (!occludedModel)
|
||||||
{
|
{
|
||||||
|
@ -79,7 +79,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
|
|||||||
|
|
||||||
osg::Group* model = new osg::Group;
|
osg::Group* model = new osg::Group;
|
||||||
|
|
||||||
osg::Node* glider = osgDB::readNodeFile("glider.osg");
|
osg::Node* glider = osgDB::readNodeFile("glider.osgt");
|
||||||
if (glider)
|
if (glider)
|
||||||
{
|
{
|
||||||
const osg::BoundingSphere& bs = glider->getBound();
|
const osg::BoundingSphere& bs = glider->getBound();
|
||||||
@ -102,7 +102,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
|
|||||||
model->addChild(xform);
|
model->addChild(xform);
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Node* cessna = osgDB::readNodeFile("cessna.osg");
|
osg::Node* cessna = osgDB::readNodeFile("cessna.osgt");
|
||||||
if (cessna)
|
if (cessna)
|
||||||
{
|
{
|
||||||
const osg::BoundingSphere& bs = cessna->getBound();
|
const osg::BoundingSphere& bs = cessna->getBound();
|
||||||
|
@ -760,7 +760,7 @@ int main( int argc, char **argv )
|
|||||||
if (!rootNode) return 0;
|
if (!rootNode) return 0;
|
||||||
|
|
||||||
|
|
||||||
//osgDB::writeNodeFile(*rootNode,"test.osg");
|
//osgDB::writeNodeFile(*rootNode,"test.osgt");
|
||||||
|
|
||||||
// set the scene to render
|
// set the scene to render
|
||||||
viewer.setSceneData(album->getScene());
|
viewer.setSceneData(album->getScene());
|
||||||
|
@ -282,7 +282,7 @@ int main( int argc, char **argv )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!scene) scene = osgDB::readNodeFile("fountain.osg");
|
if (!scene) scene = osgDB::readNodeFile("fountain.osgt");
|
||||||
|
|
||||||
osg::ref_ptr<osg::Group> group = dynamic_cast<osg::Group*>(scene.get());
|
osg::ref_ptr<osg::Group> group = dynamic_cast<osg::Group*>(scene.get());
|
||||||
if (!group)
|
if (!group)
|
||||||
|
@ -298,7 +298,7 @@ int main( int argc, char** argv )
|
|||||||
|
|
||||||
// Construct scene graph
|
// Construct scene graph
|
||||||
osg::Node* scene = osgDB::readNodeFiles( arguments );
|
osg::Node* scene = osgDB::readNodeFiles( arguments );
|
||||||
if ( !scene ) scene = osgDB::readNodeFile( "cow.osg" );
|
if ( !scene ) scene = osgDB::readNodeFile( "cow.osgt" );
|
||||||
if ( !scene )
|
if ( !scene )
|
||||||
{
|
{
|
||||||
std::cout << arguments.getApplicationName() <<": No data loaded" << std::endl;
|
std::cout << arguments.getApplicationName() <<": No data loaded" << std::endl;
|
||||||
|
@ -467,7 +467,7 @@ int main( int argc, char **argv )
|
|||||||
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
|
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!loadedModel) loadedModel = osgDB::readNodeFile("cessna.osg");
|
if (!loadedModel) loadedModel = osgDB::readNodeFile("cessna.osgt");
|
||||||
|
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
{
|
{
|
||||||
@ -484,7 +484,7 @@ int main( int argc, char **argv )
|
|||||||
osg::Group* rootNode = new osg::Group();
|
osg::Group* rootNode = new osg::Group();
|
||||||
rootNode->addChild(createPreRenderSubGraph(loadedModelTransform,tex_width,tex_height, renderImplementation, useImage, useTextureRectangle, useHDR, samples, colorSamples));
|
rootNode->addChild(createPreRenderSubGraph(loadedModelTransform,tex_width,tex_height, renderImplementation, useImage, useTextureRectangle, useHDR, samples, colorSamples));
|
||||||
|
|
||||||
osgDB::writeNodeFile(*rootNode, "test.ive");
|
//osgDB::writeNodeFile(*rootNode, "test.osgb");
|
||||||
|
|
||||||
// add model to the viewer.
|
// add model to the viewer.
|
||||||
viewer.setSceneData( rootNode );
|
viewer.setSceneData( rootNode );
|
||||||
|
@ -340,7 +340,7 @@ int main( int argc, char **argv )
|
|||||||
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
|
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!loadedModel) loadedModel = osgDB::readNodeFile("cessna.osg");
|
if (!loadedModel) loadedModel = osgDB::readNodeFile("cessna.osgt");
|
||||||
|
|
||||||
// if no model has been successfully loaded report failure.
|
// if no model has been successfully loaded report failure.
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
@ -371,7 +371,7 @@ int main( int argc, char **argv )
|
|||||||
// hint to tell viewer to request stencil buffer when setting up windows
|
// hint to tell viewer to request stencil buffer when setting up windows
|
||||||
osg::DisplaySettings::instance()->setMinimumNumStencilBits(8);
|
osg::DisplaySettings::instance()->setMinimumNumStencilBits(8);
|
||||||
|
|
||||||
osgDB::writeNodeFile(*rootNode, "test.osg");
|
//osgDB::writeNodeFile(*rootNode, "test.osgt");
|
||||||
|
|
||||||
return viewer.run();
|
return viewer.run();
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ int main( int argc, char **argv )
|
|||||||
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
|
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osg");
|
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osgt");
|
||||||
|
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
{
|
{
|
||||||
|
@ -134,10 +134,10 @@ osg::Sequence* createSequence(osg::ArgumentParser& arguments)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
filenames.push_back("cow.osg");
|
filenames.push_back("cow.osgt");
|
||||||
filenames.push_back("dumptruck.osg");
|
filenames.push_back("dumptruck.osgt");
|
||||||
filenames.push_back("cessna.osg");
|
filenames.push_back("cessna.osgt");
|
||||||
filenames.push_back("glider.osg");
|
filenames.push_back("glider.osgt");
|
||||||
}
|
}
|
||||||
|
|
||||||
for(Filenames::iterator itr = filenames.begin();
|
for(Filenames::iterator itr = filenames.begin();
|
||||||
|
@ -423,7 +423,7 @@ namespace ModelTwo
|
|||||||
|
|
||||||
osg::Group* model = new osg::Group;
|
osg::Group* model = new osg::Group;
|
||||||
|
|
||||||
osg::Node* cessna = osgDB::readNodeFile("cessna.osg");
|
osg::Node* cessna = osgDB::readNodeFile("cessna.osgt");
|
||||||
if (cessna)
|
if (cessna)
|
||||||
{
|
{
|
||||||
const osg::BoundingSphere& bs = cessna->getBound();
|
const osg::BoundingSphere& bs = cessna->getBound();
|
||||||
@ -959,7 +959,7 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// osgDB::writeNodeFile(*group,"test.osg");
|
// osgDB::writeNodeFile(*group,"test.osgt");
|
||||||
|
|
||||||
while (!viewer.done())
|
while (!viewer.done())
|
||||||
{
|
{
|
||||||
@ -1016,7 +1016,7 @@ int main(int argc, char** argv)
|
|||||||
static int dumpFileNo = 0;
|
static int dumpFileNo = 0;
|
||||||
dumpFileNo ++;
|
dumpFileNo ++;
|
||||||
char filename[256];
|
char filename[256];
|
||||||
std::sprintf( filename, "shadowDump%d.osg", dumpFileNo );
|
std::sprintf( filename, "shadowDump%d.osgt", dumpFileNo );
|
||||||
|
|
||||||
osgShadow::MinimalShadowMap * msm = dynamic_cast<osgShadow::MinimalShadowMap*>( shadowedScene->getShadowTechnique() );
|
osgShadow::MinimalShadowMap * msm = dynamic_cast<osgShadow::MinimalShadowMap*>( shadowedScene->getShadowTechnique() );
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
osgViewer::Viewer viewer(arguments);
|
osgViewer::Viewer viewer(arguments);
|
||||||
|
|
||||||
std::string outputfile("output.osg");
|
std::string outputfile("output.osgt");
|
||||||
while (arguments.read("-o",outputfile)) {}
|
while (arguments.read("-o",outputfile)) {}
|
||||||
|
|
||||||
while (arguments.read("-s")) { viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded); }
|
while (arguments.read("-s")) { viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded); }
|
||||||
@ -278,12 +278,12 @@ int main( int argc, char **argv )
|
|||||||
group1->setNodeMask(1);
|
group1->setNodeMask(1);
|
||||||
|
|
||||||
// Uncomment these lines if you like to compare the loaded model to the resulting model in a merge/diff tool
|
// Uncomment these lines if you like to compare the loaded model to the resulting model in a merge/diff tool
|
||||||
//osgDB::writeNodeFile(*loadedModel.get(), "dummy1.osg");
|
//osgDB::writeNodeFile(*loadedModel.get(), "dummy1.osgt");
|
||||||
|
|
||||||
osgDB::writeNodeFile(*loadedModel.get(), outputfile);
|
osgDB::writeNodeFile(*loadedModel.get(), outputfile);
|
||||||
osg::ref_ptr<osg::Node> convertedModel = osgDB::readNodeFile(outputfile);
|
osg::ref_ptr<osg::Node> convertedModel = osgDB::readNodeFile(outputfile);
|
||||||
|
|
||||||
//osgDB::writeNodeFile(*convertedModel.get(), "dummy2.osg");
|
//osgDB::writeNodeFile(*convertedModel.get(), "dummy2.osgt");
|
||||||
|
|
||||||
osg::Group* group2 = new osg::Group;
|
osg::Group* group2 = new osg::Group;
|
||||||
group2->addChild(convertedModel.get());
|
group2->addChild(convertedModel.get());
|
||||||
|
@ -102,7 +102,7 @@ int main( int argc, char **argv )
|
|||||||
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
|
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!loadedModel) loadedModel = osgDB::readNodeFile("dumptruck.osg");
|
if (!loadedModel) loadedModel = osgDB::readNodeFile("dumptruck.osgt");
|
||||||
|
|
||||||
// if no model has been successfully loaded report failure.
|
// if no model has been successfully loaded report failure.
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
|
@ -401,7 +401,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
osg::Node* cessna = osgDB::readNodeFile("cessna.osg");
|
osg::Node* cessna = osgDB::readNodeFile("cessna.osgt");
|
||||||
if (cessna)
|
if (cessna)
|
||||||
{
|
{
|
||||||
double s = 200000.0 / cessna->getBound().radius();
|
double s = 200000.0 / cessna->getBound().radius();
|
||||||
@ -457,7 +457,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout<<"Failed to read cessna.osg"<<std::endl;
|
std::cout<<"Failed to read cessna.osgt"<<std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius, osg::Geode *
|
|||||||
|
|
||||||
osg::Group* model = new osg::Group;
|
osg::Group* model = new osg::Group;
|
||||||
|
|
||||||
osg::Node* glider = osgDB::readNodeFile("glider.osg");
|
osg::Node* glider = osgDB::readNodeFile("glider.osgt");
|
||||||
if (glider)
|
if (glider)
|
||||||
{
|
{
|
||||||
const osg::BoundingSphere& bs = glider->getBound();
|
const osg::BoundingSphere& bs = glider->getBound();
|
||||||
@ -236,7 +236,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius, osg::Geode *
|
|||||||
model->addChild(xform);
|
model->addChild(xform);
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Node* cessna = osgDB::readNodeFile("cessna.osg");
|
osg::Node* cessna = osgDB::readNodeFile("cessna.osgt");
|
||||||
if (cessna)
|
if (cessna)
|
||||||
{
|
{
|
||||||
const osg::BoundingSphere& bs = cessna->getBound();
|
const osg::BoundingSphere& bs = cessna->getBound();
|
||||||
|
@ -228,7 +228,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
|
|||||||
|
|
||||||
osg::Group* model = new osg::Group;
|
osg::Group* model = new osg::Group;
|
||||||
|
|
||||||
osg::Node* cessna = osgDB::readNodeFile("cessna.osg");
|
osg::Node* cessna = osgDB::readNodeFile("cessna.osgt");
|
||||||
if (cessna)
|
if (cessna)
|
||||||
{
|
{
|
||||||
const osg::BoundingSphere& bs = cessna->getBound();
|
const osg::BoundingSphere& bs = cessna->getBound();
|
||||||
|
@ -616,7 +616,7 @@ int main( int argc, char **argv )
|
|||||||
if (!onDisk) rootNode = createScene(fileList,texmatLeft,texmatRight,radius,height,length);
|
if (!onDisk) rootNode = createScene(fileList,texmatLeft,texmatRight,radius,height,length);
|
||||||
else rootNode=new osg::Switch();
|
else rootNode=new osg::Switch();
|
||||||
|
|
||||||
//osgDB::writeNodeFile(*rootNode,"test.osg");
|
//osgDB::writeNodeFile(*rootNode,"test.osgt");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ int main( int argc, char **argv )
|
|||||||
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
|
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!loadedModel) loadedModel = osgDB::readNodeFile("dumptruck.osg");
|
if (!loadedModel) loadedModel = osgDB::readNodeFile("dumptruck.osgt");
|
||||||
|
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
// second View's displayed frustum.
|
// second View's displayed frustum.
|
||||||
//
|
//
|
||||||
// Command line arguments are taken to be models for display. If you
|
// Command line arguments are taken to be models for display. If you
|
||||||
// specify no command line arguments, the code attempts to load cow.osg.
|
// specify no command line arguments, the code attempts to load cow.osgt.
|
||||||
|
|
||||||
|
|
||||||
#include <osg/Geometry>
|
#include <osg/Geometry>
|
||||||
@ -147,8 +147,8 @@ main( int argc,
|
|||||||
{
|
{
|
||||||
// User didn't specify anything, or file(s) didn't exist.
|
// User didn't specify anything, or file(s) didn't exist.
|
||||||
// Try to load the cow...
|
// Try to load the cow...
|
||||||
osg::notify( osg::WARN ) << arguments.getApplicationName() << ": Could not find specified files. Trying \"cow.osg\" instead." << std::endl;
|
osg::notify( osg::WARN ) << arguments.getApplicationName() << ": Could not find specified files. Trying \"cow.osgt\" instead." << std::endl;
|
||||||
if ( !(scene = osgDB::readNodeFile( std::string( "cow.osg" ) ) ) )
|
if ( !(scene = osgDB::readNodeFile( std::string( "cow.osgt" ) ) ) )
|
||||||
{
|
{
|
||||||
osg::notify( osg::FATAL ) << arguments.getApplicationName() << ": No data loaded." << std::endl;
|
osg::notify( osg::FATAL ) << arguments.getApplicationName() << ": No data loaded." << std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -29,24 +29,24 @@ typedef std::list<std::string> Strings;
|
|||||||
Strings strings;
|
Strings strings;
|
||||||
strings.push_back(std::string(""));
|
strings.push_back(std::string(""));
|
||||||
strings.push_back(std::string("myfile"));
|
strings.push_back(std::string("myfile"));
|
||||||
strings.push_back(std::string(".osg"));
|
strings.push_back(std::string(".osgt"));
|
||||||
strings.push_back(std::string("myfile.osg"));
|
strings.push_back(std::string("myfile.osgt"));
|
||||||
strings.push_back(std::string("/myfile.osg"));
|
strings.push_back(std::string("/myfile.osgt"));
|
||||||
strings.push_back(std::string("home/robert/myfile.osg"));
|
strings.push_back(std::string("home/robert/myfile.osgt"));
|
||||||
strings.push_back(std::string("/home/robert/myfile.osg"));
|
strings.push_back(std::string("/home/robert/myfile.osgt"));
|
||||||
strings.push_back(std::string("\\myfile.osg"));
|
strings.push_back(std::string("\\myfile.osgt"));
|
||||||
strings.push_back(std::string("home\\robert\\myfile.osg"));
|
strings.push_back(std::string("home\\robert\\myfile.osgt"));
|
||||||
strings.push_back(std::string("\\home\\robert\\myfile.osg"));
|
strings.push_back(std::string("\\home\\robert\\myfile.osgt"));
|
||||||
strings.push_back(std::string("\\home/robert\\myfile.osg"));
|
strings.push_back(std::string("\\home/robert\\myfile.osgt"));
|
||||||
strings.push_back(std::string("\\home\\robert/myfile.osg"));
|
strings.push_back(std::string("\\home\\robert/myfile.osgt"));
|
||||||
strings.push_back(std::string("home/robert/"));
|
strings.push_back(std::string("home/robert/"));
|
||||||
strings.push_back(std::string("\\home\\robert\\"));
|
strings.push_back(std::string("\\home\\robert\\"));
|
||||||
strings.push_back(std::string("home/robert/myfile"));
|
strings.push_back(std::string("home/robert/myfile"));
|
||||||
strings.push_back(std::string("\\home\\robert\\myfile"));
|
strings.push_back(std::string("\\home\\robert\\myfile"));
|
||||||
strings.push_back(std::string("home/robert/.osg"));
|
strings.push_back(std::string("home/robert/.osgt"));
|
||||||
strings.push_back(std::string("\\home\\robert\\.osg"));
|
strings.push_back(std::string("\\home\\robert\\.osgt"));
|
||||||
strings.push_back(std::string("home/robert/myfile.ext.osg"));
|
strings.push_back(std::string("home/robert/myfile.ext.osgt"));
|
||||||
strings.push_back(std::string("home\\robert\\myfile.ext.osg"));
|
strings.push_back(std::string("home\\robert\\myfile.ext.osgt"));
|
||||||
|
|
||||||
for(Strings::iterator itr = strings.begin();
|
for(Strings::iterator itr = strings.begin();
|
||||||
itr != strings.end();
|
itr != strings.end();
|
||||||
|
@ -192,8 +192,8 @@ void runMultiThreadReadTests(int numThreads, osg::ArgumentParser& arguments)
|
|||||||
readThread->setStartBarrier(startBarrier.get());
|
readThread->setStartBarrier(startBarrier.get());
|
||||||
readThread->setEndBarrier(endBarrier.get());
|
readThread->setEndBarrier(endBarrier.get());
|
||||||
|
|
||||||
readThread->addFileName("cessna.osg");
|
readThread->addFileName("cessna.osgt");
|
||||||
readThread->addFileName("glider.osg");
|
readThread->addFileName("glider.osgt");
|
||||||
readThread->addFileName("town.ive");
|
readThread->addFileName("town.ive");
|
||||||
|
|
||||||
readThreads.push_back(readThread.get());
|
readThreads.push_back(readThread.get());
|
||||||
|
@ -39,7 +39,7 @@ FOX_OSG_MDIView::FOX_OSG_MDIView(FXMDIClient *p, const FXString &name,
|
|||||||
viewer->setKeyEventSetsDone(0);
|
viewer->setKeyEventSetsDone(0);
|
||||||
|
|
||||||
// load the scene.
|
// load the scene.
|
||||||
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile("cow.osg");
|
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile("cow.osgt");
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
{
|
{
|
||||||
return ;
|
return ;
|
||||||
|
@ -20,12 +20,12 @@ public:
|
|||||||
{
|
{
|
||||||
setThreadingModel(threadingModel);
|
setThreadingModel(threadingModel);
|
||||||
|
|
||||||
QWidget* widget1 = addViewWidget( createCamera(0,0,100,100), osgDB::readNodeFile("cow.osg") );
|
QWidget* widget1 = addViewWidget( createCamera(0,0,100,100), osgDB::readNodeFile("cow.osgt") );
|
||||||
QWidget* widget2 = addViewWidget( createCamera(0,0,100,100), osgDB::readNodeFile("glider.osg") );
|
QWidget* widget2 = addViewWidget( createCamera(0,0,100,100), osgDB::readNodeFile("glider.osgt") );
|
||||||
QWidget* widget3 = addViewWidget( createCamera(0,0,100,100), osgDB::readNodeFile("axes.osg") );
|
QWidget* widget3 = addViewWidget( createCamera(0,0,100,100), osgDB::readNodeFile("axes.osgt") );
|
||||||
QWidget* widget4 = addViewWidget( createCamera(0,0,100,100), osgDB::readNodeFile("fountain.osg") );
|
QWidget* widget4 = addViewWidget( createCamera(0,0,100,100), osgDB::readNodeFile("fountain.osgt") );
|
||||||
QWidget* popupWidget = addViewWidget( createCamera(900,100,320,240,"Popup window",true),
|
QWidget* popupWidget = addViewWidget( createCamera(900,100,320,240,"Popup window",true),
|
||||||
osgDB::readNodeFile("dumptruck.osg") );
|
osgDB::readNodeFile("dumptruck.osgt") );
|
||||||
popupWidget->show();
|
popupWidget->show();
|
||||||
|
|
||||||
QGridLayout* grid = new QGridLayout;
|
QGridLayout* grid = new QGridLayout;
|
||||||
|
@ -112,7 +112,7 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
box4->hide();
|
box4->hide();
|
||||||
|
|
||||||
osg::Node* model = osgDB::readNodeFile("spaceship.osg");
|
osg::Node* model = osgDB::readNodeFile("spaceship.osgt");
|
||||||
|
|
||||||
model->setNodeMask(MASK_3D);
|
model->setNodeMask(MASK_3D);
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ int main(int argc, char** argv) {
|
|||||||
menu->getBackground()->setColor(1.0f, 1.0f, 1.0f, 0.0f);
|
menu->getBackground()->setColor(1.0f, 1.0f, 1.0f, 0.0f);
|
||||||
menu->resizePercent(100.0f);
|
menu->resizePercent(100.0f);
|
||||||
|
|
||||||
osg::Node* model = osgDB::readNodeFile("osgcool.osg");
|
osg::Node* model = osgDB::readNodeFile("osgcool.osgt");
|
||||||
|
|
||||||
model->setNodeMask(MASK_3D);
|
model->setNodeMask(MASK_3D);
|
||||||
|
|
||||||
|
@ -346,7 +346,7 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
// AlphaSetterVisitor alpha(.8f);
|
// AlphaSetterVisitor alpha(.8f);
|
||||||
// frame->accept(alpha);
|
// frame->accept(alpha);
|
||||||
return osgWidget::createExample(viewer, wm); //osgDB::readNodeFile("cow.osg"));
|
return osgWidget::createExample(viewer, wm); //osgDB::readNodeFile("cow.osgt"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -674,6 +674,6 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
AlphaSetterVisitor alpha(.8f);
|
AlphaSetterVisitor alpha(.8f);
|
||||||
frame->accept(alpha);
|
frame->accept(alpha);
|
||||||
return osgWidget::createExample(viewer, wm, osgDB::readNodeFile("cow.osg"));
|
return osgWidget::createExample(viewer, wm, osgDB::readNodeFile("cow.osgt"));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -87,5 +87,5 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
wm->addChild(canvas);
|
wm->addChild(canvas);
|
||||||
|
|
||||||
return osgWidget::createExample(viewer, wm, osgDB::readNodeFile("cow.osg"));
|
return osgWidget::createExample(viewer, wm, osgDB::readNodeFile("cow.osgt"));
|
||||||
}
|
}
|
||||||
|
@ -157,8 +157,7 @@ int main(int argc, char** argv) {
|
|||||||
boxCopy->resizePercent(100.0f, 0.0f);
|
boxCopy->resizePercent(100.0f, 0.0f);
|
||||||
|
|
||||||
// Here we demonstrate the use of osgWidget/io_utils. This is really only useful for
|
// Here we demonstrate the use of osgWidget/io_utils. This is really only useful for
|
||||||
// debugging at the moment, but later I'll make it more generic for .osg and .ive
|
// debugging at the moment.
|
||||||
// creation.
|
|
||||||
// std::cout << *box << std::endl << *boxCopy << std::endl;
|
// std::cout << *box << std::endl << *boxCopy << std::endl;
|
||||||
|
|
||||||
// Setup our OSG objects for our scene; note the use of the utility function
|
// Setup our OSG objects for our scene; note the use of the utility function
|
||||||
@ -169,7 +168,7 @@ int main(int argc, char** argv) {
|
|||||||
// some of the other examples to see this in action...
|
// some of the other examples to see this in action...
|
||||||
osg::Group* group = new osg::Group();
|
osg::Group* group = new osg::Group();
|
||||||
osg::Camera* camera = osgWidget::createOrthoCamera(1280.0f, 1024.0f);
|
osg::Camera* camera = osgWidget::createOrthoCamera(1280.0f, 1024.0f);
|
||||||
osg::Node* model = osgDB::readNodeFile("cow.osg");
|
osg::Node* model = osgDB::readNodeFile("cow.osgt");
|
||||||
|
|
||||||
// Add our event handler; is this better as a MatrixManipulator? Add a few other
|
// Add our event handler; is this better as a MatrixManipulator? Add a few other
|
||||||
// helpful ViewerEventHandlers.
|
// helpful ViewerEventHandlers.
|
||||||
|
@ -32,7 +32,7 @@ int main( int argc, char **argv )
|
|||||||
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
|
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osg");
|
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osgt");
|
||||||
|
|
||||||
// if no model has been successfully loaded report failure.
|
// if no model has been successfully loaded report failure.
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
|
@ -42,8 +42,8 @@ osgforest
|
|||||||
echo osgfxbrowser
|
echo osgfxbrowser
|
||||||
osgfxbrowser
|
osgfxbrowser
|
||||||
|
|
||||||
echo osgoutline cow.osg
|
echo osgoutline cow.osgt
|
||||||
osgoutline cow.osg
|
osgoutline cow.osgt
|
||||||
|
|
||||||
echo osggeometry
|
echo osggeometry
|
||||||
osggeometry
|
osggeometry
|
||||||
@ -52,7 +52,7 @@ echo osghangglide
|
|||||||
osghangglide
|
osghangglide
|
||||||
|
|
||||||
echo osghud
|
echo osghud
|
||||||
osghud dumptruck.osg
|
osghud dumptruck.osgt
|
||||||
|
|
||||||
echo osgimpostor
|
echo osgimpostor
|
||||||
osgimpostor
|
osgimpostor
|
||||||
@ -61,10 +61,10 @@ echo osgkeyboard
|
|||||||
osgkeyboard
|
osgkeyboard
|
||||||
|
|
||||||
echo osgkeyboardmouse
|
echo osgkeyboardmouse
|
||||||
osgkeyboardmouse dumptruck.osg
|
osgkeyboardmouse dumptruck.osgt
|
||||||
|
|
||||||
echo osglight
|
echo osglight
|
||||||
osglight glider.osg
|
osglight glider.osgt
|
||||||
|
|
||||||
echo osglightpoint
|
echo osglightpoint
|
||||||
osglightpoint
|
osglightpoint
|
||||||
@ -73,16 +73,16 @@ echo osglogo
|
|||||||
osglogo
|
osglogo
|
||||||
|
|
||||||
echo osglogicop
|
echo osglogicop
|
||||||
osglogicop glider.osg
|
osglogicop glider.osgt
|
||||||
|
|
||||||
echo osgmotionblur
|
echo osgmotionblur
|
||||||
osgmotionblur cow.osg
|
osgmotionblur cow.osgt
|
||||||
|
|
||||||
echo osgmultitexture
|
echo osgmultitexture
|
||||||
osgmultitexture cessnafire.osg
|
osgmultitexture cessnafire.osgt
|
||||||
|
|
||||||
echo osgoccluder
|
echo osgoccluder
|
||||||
osgoccluder glider.osg
|
osgoccluder glider.osgt
|
||||||
|
|
||||||
echo osgocclusionquery
|
echo osgocclusionquery
|
||||||
osgocclusionquery
|
osgocclusionquery
|
||||||
@ -94,7 +94,7 @@ echo osgparticleeffects
|
|||||||
osgparticleeffects
|
osgparticleeffects
|
||||||
|
|
||||||
echo osgpick
|
echo osgpick
|
||||||
osgpick fountain.osg
|
osgpick fountain.osgt
|
||||||
|
|
||||||
echo osgpointsprite
|
echo osgpointsprite
|
||||||
osgpointsprite
|
osgpointsprite
|
||||||
@ -103,28 +103,28 @@ echo osgplanets
|
|||||||
osgplanets
|
osgplanets
|
||||||
|
|
||||||
echo osgprecipitation --rain 0.5
|
echo osgprecipitation --rain 0.5
|
||||||
osgprecipitation --rain 0.5 lz.osg
|
osgprecipitation --rain 0.5 lz.osgt
|
||||||
|
|
||||||
echo osgprecipitation --snow 0.5
|
echo osgprecipitation --snow 0.5
|
||||||
osgprecipitation --snow 0.5 lz.osg
|
osgprecipitation --snow 0.5 lz.osgt
|
||||||
|
|
||||||
echo osgprerender
|
echo osgprerender
|
||||||
osgprerender dumptruck.osg
|
osgprerender dumptruck.osgt
|
||||||
|
|
||||||
echo osgprerendercubemap
|
echo osgprerendercubemap
|
||||||
osgprerendercubemap
|
osgprerendercubemap
|
||||||
|
|
||||||
echo osgreflect
|
echo osgreflect
|
||||||
osgreflect cessna.osg
|
osgreflect cessna.osgt
|
||||||
|
|
||||||
echo osgscalarbar
|
echo osgscalarbar
|
||||||
osgscalarbar
|
osgscalarbar
|
||||||
|
|
||||||
echo osgscribe
|
echo osgscribe
|
||||||
osgscribe cow.osg
|
osgscribe cow.osgt
|
||||||
|
|
||||||
echo osgsequence
|
echo osgsequence
|
||||||
osgsequence cow.osg dumptruck.osg cessna.osg glider.osg
|
osgsequence cow.osgt dumptruck.osgt cessna.osgt glider.osgt
|
||||||
|
|
||||||
echo osgshaders
|
echo osgshaders
|
||||||
osgshaders
|
osgshaders
|
||||||
@ -136,19 +136,19 @@ echo osgparametric
|
|||||||
osgparametric
|
osgparametric
|
||||||
|
|
||||||
echo osgthirdpersonview
|
echo osgthirdpersonview
|
||||||
osgthirdpersonview cow.osg
|
osgthirdpersonview cow.osgt
|
||||||
|
|
||||||
echo osgviewer glsl_simple.osg
|
echo osgviewer glsl_simple.osgt
|
||||||
osgviewer glsl_simple.osg
|
osgviewer glsl_simple.osgt
|
||||||
|
|
||||||
echo osgviewer glsl_confetti.osg
|
echo osgviewer glsl_confetti.osgt
|
||||||
osgviewer glsl_confetti.osg
|
osgviewer glsl_confetti.osgt
|
||||||
|
|
||||||
echo osgviewer glsl_mandelbrot.osg
|
echo osgviewer glsl_mandelbrot.osgt
|
||||||
osgviewer glsl_mandelbrot.osg
|
osgviewer glsl_mandelbrot.osgt
|
||||||
|
|
||||||
echo osgviewer glsl_julia.osg
|
echo osgviewer glsl_julia.osgt
|
||||||
osgviewer glsl_julia.osg
|
osgviewer glsl_julia.osgt
|
||||||
|
|
||||||
echo osgshape
|
echo osgshape
|
||||||
osgshape
|
osgshape
|
||||||
@ -163,7 +163,7 @@ echo osgshadow -3 --ssm
|
|||||||
osgshadow -3 --ssm
|
osgshadow -3 --ssm
|
||||||
|
|
||||||
echo osgsimplifier
|
echo osgsimplifier
|
||||||
osgsimplifier --ratio 0.1 cessna.osg
|
osgsimplifier --ratio 0.1 cessna.osgt
|
||||||
|
|
||||||
echo osgsimulation
|
echo osgsimulation
|
||||||
osgsimulation
|
osgsimulation
|
||||||
|
Loading…
Reference in New Issue
Block a user