home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / sgi / 18153 < prev    next >
Encoding:
Internet Message Format  |  1992-12-17  |  1.2 KB

  1. 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
  2. From: gavin@krypton.asd.sgi.com (Gavin Bell)
  3. Newsgroups: comp.sys.sgi
  4. Subject: Re: Inventor Question
  5. Message-ID: <1gqh53INNgkm@fido.asd.sgi.com>
  6. Date: 17 Dec 92 18:33:07 GMT
  7. References: <1992Dec16.162928.16505@erenj.com> <1go6veINN40j@fido.asd.sgi.com> <1992Dec17.025040.2312@research.nj.nec.com>
  8. Organization: Silicon Graphics, Inc.  Mountain View, CA
  9. Lines: 19
  10. NNTP-Posting-Host: krypton.asd.sgi.com
  11.  
  12. In <1992Dec17.025040.2312@research.nj.nec.com> brad@research.nj.nec.com (Brad Gianulis) writes:
  13. >So, Gavin, in C++, wouldn't that be:
  14. >    sph_cmplx->value.setValue( 0.25 );
  15. >(I'm learning Inventor (and C++), too. and just want to make sure I got
  16. >it right).
  17.  
  18. Yes.  But:
  19.     sph_cmplx->value = 0.25;
  20. ...works in C++ too, since SoSFFloat does (this is from the output of
  21. CC -E /usr/include/Inventor/fields/SoSFFloat.h):
  22.  
  23.     ... bunch of stuff ...
  24.     float operator= (float newValue){ setValue(newValue); return value;}
  25.     ... etc ..
  26.  
  27. Operator overloading can be very convenient, but it is actually one of
  28. my least favorite features of C++...
  29. --
  30. --gavin     (gavin@sgi.com,  (415)390-1024)
  31.