Hi Chris, Peter, > -----Original Message----- > Behalf Of Chris 'Xenon' Hanson > > Peter Hrenka wrote: > >> normalize/unitize, so the distinction is a blurry one. > > Well, I don't think the distinction is blurry at all. > > I think the only blurriness comes from OSG's occasional use > of Vecn classes to store things that aren't really > vector-space, like colors, which do benefit from perComponent > operations.
You can do matrix operations on colors just like vertices. The multiply and divide you've been discussing is really multiplying the vec with a matrix that has been scaled. Obviously, it's faster to do 3 or 4 multiplies vs. multiplying with a full 3x3 or 4x4 matrix of mostly zeros. > > > I would prefer to rename these operators to regular methods instead > > which could be called "perComponentMultipy" > > and "perComponentDivide" or something like that. > > That would remove all potential of misunderstanding. > > I am ok with that if you think confusion is likely to arise. Robert, if you think you need to make a new function in the vec classes it should be named "scale". That would be more consistent with the Matrix classes. > > > Cheers, > > Peter > > -- > Chris 'Xenon' Hanson, omo sanza lettere ---- Tom Jolley _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
