Re: C++ node->setTravData

New Message Reply Date view Thread view Subject view Author view

Angus Henderson (angus++at++death.reading.sgi.com)
Tue, 26 Mar 1996 17:23:31 +0000


I have found the problem myself.... the nodes on which I was setting the
travFuncs and travData were all cloned from one pfGeode - I did not realise
that a cloned geode returns the parent. As is says in the manual pages....

" ....An attempt to clone
     a leaf geometry node simply returns the handle to that node...."

ANGus

On Mar 26, 4:25pm, Angus Henderson wrote:
> Subject: C++ node->setTravData
> Has anyone got an example of a Performer 2.0-C++-node->setTravData ?
>
> I had a working version with Performer 1.2-C-pfNodeTravData, but when I
cannot
> get a valid pointer to my draw process in 2.0.
>
> I do something like....
>
> ExpTravData *edt[MAX_EXPLOSIONS];
>
>
> for(i = 0; i < MAX_EXPLOSIONS; i++)
> {
> edt[i] =
> (ExpTravData*)pfMalloc(sizeof(ExpTravData),pfGetSharedArena());
>
> node->setTravData( PFTRAV_DRAW, edt[i] );
> }
>
> In the pre node draw callback I always get a pointer to the last element of
edt
> and none of the others.
>
> I am using a C type call to pfMalloc 'cos that's what perfly.C does, I could
> also use an example of how to use pfMemory->malloc on user data instead.
>
> ANGus
>
>
>
>-- End of excerpt from Angus Henderson


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:35 PDT

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