#ifdef _DEBUG
#pragma comment(lib,"osgViewerd.lib")
#pragma comment(lib,"osgDBd.lib")
#pragma comment(lib,"OpenThreadsd.lib")
#pragma comment(lib,"osgd.lib")
#else
#pragma comment(lib,"osgViewer.lib")
#pragma comment(lib,"osgDB.lib")
#pragma comment(lib,"OpenThreads.lib")
#pragma comment(lib,"osgUtil.lib")
#pragma comment(lib,"osg.lib")
#endif
#include <osgDB/ReadFile>
#include <osgViewer/Viewer>
#include <osgViewer/ViewerEventHandlers>
#include <osg/MatrixTransform>
#include <osg/Node>
int main()
{
osg::ref_ptr<osgViewer::Viewer> viewer = new osgViewer::Viewer;
osg::ref_ptr<osg::Group> gp= new osg::Group;
osg::ref_ptr<osg::Node> cowNode = osgDB::readNodeFile("cow.osg");
gp->addChild(cowNode);
osg::ref_ptr<osg::MatrixTransform > yaw= new osg::MatrixTransform;
yaw->setMatrix(osg::Matrix::rotate(osg::DegreesToRadians(-45.0),0,1,0)*osg::Matrix::translate(0,0,3));
yaw->addChild(cowNode);
gp->addChild(yaw);
viewer->setSceneData(gp);
return viewer->run();
}