On 11/1/07, Renan Mendes <[EMAIL PROTECTED]> wrote:
> Hello, everyone.
>
>  To achieve my goal in my OSG application, I need the shapes that are on the
> screen to change their colors when selected by mouse picking. All the shapes
> that are on the screen, from the class "Sphere", for instance, have the
> following pattern of inheritance (in which the symbol '->' means that the
> following class inherits the methods from the previous one):
>
>  osg::MatrixTransform -> Primitive -> Sphere
>
>  With this, I mean that a sphere created is a matrix that has a geode
> connected to it, which carries the shape's information on a shapedrawable.
>
> So, how do I change the color of a shape, which is an osg::MatrixTransform
> object, if this attribute is only accessible on osg::ShapeDrawable objects?

You have to traverse down to the ShapeDrawable and change the colour
there.  You'll also need to call dirtyDisplayList() to see the
changes.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to