Hi Robert;

Thanks for reply. I have known ShapeDrawable's main target is creating
faster general shape for scene construction :)
I will try to create my wheel by Geometry class.

Regards.

Ümit Uzun


2009/8/21 Robert Osfield <robert.osfi...@gmail.com>

> Hi Umit,
>
> The osg::Shapes/osg::ShapeDrawable really aren't written to be used
> for general geometry/scene construction.  osg::Shape exist to help
> with defining primitive shapes for physics modeling, and the
> ShapeDrawable as a just a convenience method to help visualize them.
>
> The tool to use is osg::Geometry as it will give you complete
> flexibility.  See the osggeometry example.
>
> Robert.
>
> On Fri, Aug 21, 2009 at 10:09 AM, Ümit Uzun<umituzu...@gmail.com> wrote:
> > Hi All;
> >
> > If this is much simple question please forgive me :D I am trying to
> create
> > wheel body and related texture by using ShapeDrawable and can't. Do I
> have
> > to use Modeling tools to create my expected looking images as you can see
> > from attached image? Or Do I have to manipulate texture coordinate by
> > programmatically at runtime? What should I do? I can create this wheel
> easly
> > by using Blender but I want to create by coding.
> >
> > ExpectedWheel part had created on DirectX by using same wheel texture.
> >
> > My Code:
> >     // Wheel
> >     osg::ref_ptr<osg::Geode> wheelGeode = new osg::Geode();
> >     wheelGeode->addDrawable(new osg::ShapeDrawable(new
> > osg::Cylinder(osg::Vec3(0.0, 0.0, 0.0), RADIUS, 0.08)));
> >     osg::ref_ptr<osg::Texture2D> texWheel = new osg::Texture2D();
> >     texWheel->setImage(osgDB::readImageFile("./Data/wheel.bmp"));
> >     wheelGeode->getOrCreateStateSet()->setTextureAttributeAndModes(0,
> > texWheel.get(), osg::StateAttribute::ON);
> >
> > Regards.
> >
> > Ümit Uzun
> >
> > _______________________________________________
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to