From: Yair Kurzion (yair++at++polygon.engr.sgi.com)
Date: 06/19/2000 14:55:37
Hi Jorge !
pfSwitch::setVal and pfSwitch::getVal take/return a float as the include file
says (The man page is incorrect).
The current pfSwitch implementation uses only the integer portion of the
value. The float value was added for two reasons:
1. If you have node callbacks on your pfSwitch node, and you have some
way to modify your geometry (morph it), you can call getVal and use the float
value for your morphing.
2. If you subclass pfSwitch, a float switch value seems more flexible.
-yair
> The pfSwitch man page (on Irix & Linux) says that pfSwitch::getVal() returns
> an int but the function returns a float. It also says that
> pfSwitch::setVal(int val) take an int as argument but it actually takes a
> float.
>
> Is the documentation wrong? or is it the code? (I guess that the value of a
> swicth can't be something like 1.6789, it should be an int, no?)
>
>
> Thanks.
>
>
> --
> Jorge Valencia
> Space System Engineer
> CAE Electronics Ltd.
> jorgev++at++cae.ca
> (514) 341-2000 x3733
>
>
> >From the pfSwitch man page:
>
> int pfSwitch::setVal(int val);
>
> int pfSwitch::getVal(void);
>
>
>
> >From the /usr/include/Performer/pf/pfSwitch.h file:
>
> class pfSwitch : public pfGroup
> {
> public:
>
> int setVal(float val) {
> return PFSWITCH->nb_setVal(val);
> }
>
> float getVal() const {
> return PFSWITCH->nb_getVal();
> }
> ...
> }
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/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
\__ \__ \__
This archive was generated by hypermail 2b29 : Mon Jun 19 2000 - 14:55:58 PDT