Hello:

You could just override the apply on group and within that virtual method do a test on:

dynamic_cast<MyClass*)(&ptr);

where ptr is the passed in argument to apply. Just add a check for not null and then you should be good to go. Is this the functionality you are after?


Take care

Garrett

On Dec 3, 2006, at 3:47 PM, Art Tevs wrote:

Hi, Benoit!

What idea should we have?

If I understood your approach correct, so I think that this thing would compile at all. Or if it will, then always apply(Group&) will be called.

MfG, Art

On Sunday 03 December 2006 20:46, Benoît Poulard wrote:
Hi,
I try to extend osg::NodeVisitor::apply in order to work with my own class
that inherits of osg::Group.

[code]
class MyClass : public osg::Group;

class MyVisitor: public osg::nodeVisitor
{
    public:
    ...
    virtual void apply(MyClass& mc);
};

MyClass* myclass = new MyClass();
myclass->accept(new MyVisitor());

[/code]

Does anybody have an idea?

Thank's

Ben





___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to