Re: Billboards

New Message Reply Date view Thread view Subject view Author view

Mario Veraart (rioj7++at++fel.tno.nl)
Wed, 16 Oct 1996 11:18:40 +0200 (MET DST)


>
> > if (bill = (pfBillboard *)pfdLoadFile("tree.iv")) {
> >
> > pfVec3 billaxis = pfVec3(1.0f, 0.0f, 0.0f);
> > bill->setMode(PFBB_ROT, PFBB_AXIAL_ROT);
> > bill->setAxis(billaxis);
> > parent->addChild(bill);
> > }
> >
> >I get a core dump when it gets to the setMode line. Does this code look
> >reasonable, or have I missed something?
I think it's very reasonable you get a coredump because
a pfNode ISNOT a pfBillboard. What is true is: a pfBillboard ISA pfNode.
You may cast a pfBillboard* to a pfNode* but not the otherway round.
A pfNode lacks some info (variables) that a pfBillboard need.

>
> The setting for the Bboard seems to be correct.
> I don't work with the C++ api and so the only point that strikes me is the
> vector setting, I'd better try pfSetVec3(billaxis,1.0f, 0.0f, 0.0f);
It's just the copying of class members so it's alright to do it that way.

Mario
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


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:53:46 PDT

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