From: Ben S. <bs...@vr...> - 2002-05-30 20:32:04
|
I guess I'm not making my arguments clear (a common problem with me). :( I think that the translational aspect of a matrix is A PROPERTY OF THAT MATRIX. That property is generally considered as being the fourth column vector that makes up that matrix. Thus when I wish to retrieve the translation of a matrix I don't consider it creational, because IT ALREADY EXISTS as a part of the matrix. Now, consider this; we happened to implement our matrix as 16 floating point values. Thus to get the translation of a matrix, we must create a temporary vector to store those values in. What if instead we implemented the matrix as 4 column vectors? Then retrieving the translation from the matrix is no longer causes the construction of a new vector since just a reference to the fourth column vector would be returned. In that case, the function IS NOT CREATIONAL. See, I think that the naming conventions used in GMTL are based on syntactic reasons rather than semantic reasons that may cause some interesting learning and usability problems since it goes against common Object Oriented design idioms. cheers, ----- Ben Scott Research Assistant VRAC bs...@ia... On Wed, 29 May 2002, Allen Bierbaum wrote: > Unless I am missing something, I would say they are both creational. > Both methods create a temporary object that is returned by value. The > only real difference is that in one the thing going in (vec) is smaller > then the thing coming out (Matrix) while the other method takes > something larger in and spits out something smaller. In every other way > the semantics are the same from what I can tell. > > Is there something I am missing? > > -Allen > > Ben Scott wrote: > > > > The semantics are different because makeTrans<Matrix>(Vec) is purely > > creational whereas makeTrans<Vec>(Matrix) is a retrieval function. > > makeTrans<Vec>(Matrix) is creational only as a byproduct of the fact that > > the data it needs to return must be in vector form. > > > > ----- > > Ben Scott > > Research Assistant VRAC > > bs...@ia... > > > > On Wed, 29 May 2002, Kevin Meinert wrote: > > > > > > > > the semantics of all make functions are that they take input data, and > > > create something. > > > > > > the beauty of it is that you can insert arbitrary data (usually as long as > > > we implement the funcs) > > > > > > > Matrix makeTrans<Matrix>(Vec) > > > > Vec makeTrans<Vec>(Matrix) > > > > > > and even > > > Matrix makeTrans<Matrix>(Matrix) > > > > > > are all ways to get data types from others. I guess I don't see how this > > > breaks any semantics. The make functions are still object oriented in the > > > sense that they are factories, or constructors of objects. > > > > > > as soon as you understand this point, they should be usable. > > > > > > does that clear it up? > > > > > > > > > kevin > > > > > > > > > _______________________________________________________________ > > > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > > > > _______________________________________________ > > > ggt-devel mailing list > > > ggt...@li... > > > https://lists.sourceforge.net/lists/listinfo/ggt-devel > > > > > > > _______________________________________________________________ > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > > _______________________________________________ > > ggt-devel mailing list > > ggt...@li... > > https://lists.sourceforge.net/lists/listinfo/ggt-devel > > -- Allen Bierbaum al...@vr... > -- PhD Candidate txtmsg - 515...@us... > -- VR Juggler Team http://www.vrjuggler.org > -- Virtual Reality Applications Lab http://www.vrac.iastate.edu > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > ggt-devel mailing list > ggt...@li... > https://lists.sourceforge.net/lists/listinfo/ggt-devel > |