home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!europa.asd.contel.com!howland.reston.ans.net!usc!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!spool.mu.edu!olivea!sgigate!sgi!fido!krypton!gavin
- From: gavin@krypton.asd.sgi.com (Gavin Bell)
- Newsgroups: comp.sys.sgi
- Subject: Re: Inventor Question
- Message-ID: <1gqh53INNgkm@fido.asd.sgi.com>
- Date: 17 Dec 92 18:33:07 GMT
- References: <1992Dec16.162928.16505@erenj.com> <1go6veINN40j@fido.asd.sgi.com> <1992Dec17.025040.2312@research.nj.nec.com>
- Organization: Silicon Graphics, Inc. Mountain View, CA
- Lines: 19
- NNTP-Posting-Host: krypton.asd.sgi.com
-
- In <1992Dec17.025040.2312@research.nj.nec.com> brad@research.nj.nec.com (Brad Gianulis) writes:
- >So, Gavin, in C++, wouldn't that be:
- > sph_cmplx->value.setValue( 0.25 );
- >(I'm learning Inventor (and C++), too. and just want to make sure I got
- >it right).
-
- Yes. But:
- sph_cmplx->value = 0.25;
- ...works in C++ too, since SoSFFloat does (this is from the output of
- CC -E /usr/include/Inventor/fields/SoSFFloat.h):
-
- ... bunch of stuff ...
- float operator= (float newValue){ setValue(newValue); return value;}
- ... etc ..
-
- Operator overloading can be very convenient, but it is actually one of
- my least favorite features of C++...
- --
- --gavin (gavin@sgi.com, (415)390-1024)
-