Re: again: subclassing pfNode
Daniel Jia (rock.csd.sgi.com!sgi.sgi.com!uunet.uu.net!ds9!cagiva!xilin)
Mon, 9 Dec 1996 16:15:34 -0500
On Dec 9, 11:17am, Steve Baker wrote:
> Subject: Re: again: subclassing pfNode
>
> Carsten Scharfe wrote:
>
> > i think my problem was misunderstood.
> >
> > Subclassing from pfGroup instead of pfNode would
> > give the derived Node Class the properties of a pfGroup.
> > That is not my aim.
>
> I think I understand what you want - and although it *seems*
> reasonable, I'm not sure you'll get it to work in practice.
>
> The problem is that when Performer walks the database tree
> for any reason (APP, CULL, ISECT and others need to do this),
> they have no idea what to do with your node.
>
> Imagine that CULL is traversing the scene graph, selecting
> just those nodes that are in the field of view. Somehow,
> it has to know that for pfGroups and their derivatives, it
> has to recurse down into the child nodes, and for pfGeodes
> and their derivatives, that something different happens.
>
> The trouble with the pfNode abstract class is that it appears
> to have no documented public/protected member function for
> deciding what CULL should do.
>
> I would have expected there to be a pfNode::cull() member
> function, but (at least according to the man page) there
> is no such beast. This is a little suprising - but that's
> it. Performer doesn't know how to traverse your new node
> so you're stuck.
>
>
>-- End of excerpt from Steve Baker
There is a
virtual int nb_cull(int mode, int cullResult, _pfCuller *trav) = 0;
and a
virtual int nb_intersect(_pfIsector *itrav) = 0;
in pfNode. So it seems that once you correctly supply these functions, the
newly derived class should work. But at least I haven't seen any documentation
on how to furnish these functions. Does anyone know how to do that?
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2
on Mon Aug 10 1998 - 17:54:07 PDT