Re: questions about subclassing pfNode

New Message Reply Date view Thread view Subject view Author view

From: Yair Kurzion (yair++at++polygon.engr.sgi.com)
Date: 01/18/2001 18:50:02


Hello Damin !

Take a look in the Performer Programmer's Guide, it the chapter labeled:
``Programming with C++'' which contains a section on subclassing Performer
objects.

It looks like you want to replace the drawing method on your subclassed node.
Please note (the last page of above chapter) that Performer has a duplicate
copy of each node for the APP, CULL and ISECT processes. When you subclass a
node, only the APP copy of your new node is of the new subclassed type. The
CULL and ISECT copies are of the parent class. So, you can only change a node
behavior in the APP process.

Another note:
Nodes don't exist in the DRAW process. The DRAW process uses a display list
to render pfGeoSets.

-yair

> I am interesting in writing a subclass of pfNode for use in code testing,
> and have some problems/questions that I hope one of you could answer.
>
> 1) The only constructor listed in pfNode.h takes a pointer to a pfBuffer.
> What does this pfBuffer do, and how do I create/aquire one to pass to the
> constructor.
>
> 2) What's the correct way to isolate changes to the rendering state? Is
> the following psuedo-code correct?
>
> pfPushState()
> pfFlushState()
> pfBasicState()
> // my code here.
> pfPopState()
>
> 3) I'm manually creating a bounding sphere using the following code,
> pfSphere bSphere;
> bSphere.center.set(0, 0, 0);
> bSphere.radius = 100;
> setBound(&bSphere, PFBOUND_STATIC);
> Does anything else need to be done/set to prevent the node from getting
> culled?
>
> Thanks,
> Damin Keenan.
>
>
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>

-- 
\_________  \_____  \__    \__  \_____         Yair Kurzion
\_________  \_____   \__   \__  \_____         yair++at++sgi.com
       \__     \__   \____\__      \__   http://reality.sgi.com/yair
       \__          \__  \__                Work: (650) 933-6502
       \__          \__   \__               Home: (408) 226-9771
       \__          \__    \__             


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Jan 18 2001 - 18:50:16 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.