Re: pfTraverser xform depth
Hansong Zhang (zhangh++at++cs.unc.edu)
Sun, 16 Jun 1996 10:19:25 -0400 (EDT)
>
> On Jun 15, 11:32am, Hansong Zhang wrote:
> > Subject: pfTraverser xform depth
> > Hello Performers,
> >
> > pfTraverser seems to have no member function that return the
> > depth of the current matrix stack, or return the stack itself
> > (which has the depth info). Are there other ways to get the
> > xform depth? I want to check depth to see if xform is really
> > necessary (i.e. if there're dcs etc on the path). Any
> > suggestions are welcome. Thanks!
>
> Quick hack...
>
> const pfPath *path = trav->getPath();
>
> for (register int i=0; i<path->getNum(); ++i)
> {
> pfNode *node = (pfNode *) path->get(i);
>
> if (node->isOfType (pfDCS::getClassType()))
> {
> // Ha...found dcs...
> }
> }
>
> Hope that helps...I haven't tried it though...
>
> K.
>
> --
> kowsik++at++coryphaeus.com | pirts suiboM a hguorht neeb sah txet sihT
> http://www.coryphaeus.com |
> | You are not you, you are me! - arnie
> work: (408)-395-4537 e201 |
>
Thanks Kowsik! The problem is that the search seems too expensive if
done at every node. Actually one can check wether the matrix returned
by pfTraverser::getMat() is an identity matrix (16 or fewer
comparisons). But sure life's better if depth is directly available...
cheers,
Hansong
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer.html
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:53:01 PDT