Show
Ignore:
Timestamp:
09/06/05 17:48:18 (9 years ago)
Author:
robert
Message:

Added osgSim::OverlayNode? to osganimate and osgspheresegment examples, and
added support for setting texture size hint and coping with scene graphs
with CoordinateSystemNode? in them.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osganimate/osganimate.cpp

    r1844 r4506  
    1313#include <osgGA/FlightManipulator> 
    1414#include <osgGA/DriveManipulator> 
     15 
     16#include <osgSim/OverlayNode> 
    1517 
    1618#include <osgProducer/Viewer> 
     
    180182    osg::Group* root = new osg::Group; 
    181183 
    182     root->addChild(createMovingModel(center,radius*0.8f)); 
    183  
    184     root->addChild(createBase(center-osg::Vec3(0.0f,0.0f,radius*0.5),radius)); 
     184    osg::Node* baseModel = createBase(center-osg::Vec3(0.0f,0.0f,radius*0.5),radius); 
     185    osg::Node* movingModel = createMovingModel(center,radius*0.8f); 
     186 
     187#if 1 
     188    osgSim::OverlayNode* overlayNode = new osgSim::OverlayNode; 
     189    overlayNode->setOverlaySubgraph(movingModel); 
     190    overlayNode->addChild(baseModel); 
     191    root->addChild(overlayNode); 
     192#else 
     193    root->addChild(baseModel); 
     194#endif 
     195 
     196    root->addChild(movingModel); 
    185197 
    186198    return root;