Show
Ignore:
Timestamp:
03/02/04 21:33:00 (10 years ago)
Author:
robert
Message:

From David Jung, added support for osg::Capsule shape

Files:
1 modified

Legend:

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

    r2395 r2767  
    4242    geode->addDrawable(new osg::ShapeDrawable(new osg::Cone(osg::Vec3(4.0f,0.0f,0.0f),radius,height),hints)); 
    4343    geode->addDrawable(new osg::ShapeDrawable(new osg::Cylinder(osg::Vec3(6.0f,0.0f,0.0f),radius,height),hints)); 
     44    geode->addDrawable(new osg::ShapeDrawable(new osg::Capsule(osg::Vec3(8.0f,0.0f,0.0f),radius,height),hints)); 
    4445 
    4546    osg::HeightField* grid = new osg::HeightField; 
     
    5960    osg::ConvexHull* mesh = new osg::ConvexHull; 
    6061    osg::Vec3Array* vertices = new osg::Vec3Array(4); 
    61     (*vertices)[0].set(7.0+0.0f,-1.0f+2.0f,-1.0f+0.0f); 
    62     (*vertices)[1].set(7.0+1.0f,-1.0f+0.0f,-1.0f+0.0f); 
    63     (*vertices)[2].set(7.0+2.0f,-1.0f+2.0f,-1.0f+0.0f); 
    64     (*vertices)[3].set(7.0+1.0f,-1.0f+1.0f,-1.0f+2.0f); 
     62    (*vertices)[0].set(9.0+0.0f,-1.0f+2.0f,-1.0f+0.0f); 
     63    (*vertices)[1].set(9.0+1.0f,-1.0f+0.0f,-1.0f+0.0f); 
     64    (*vertices)[2].set(9.0+2.0f,-1.0f+2.0f,-1.0f+0.0f); 
     65    (*vertices)[3].set(9.0+1.0f,-1.0f+1.0f,-1.0f+2.0f); 
    6566    osg::UByteArray* indices = new osg::UByteArray(12); 
    6667    (*indices)[0]=0;