Hi Peter, Chris, Tom et. al,

On Mon, Nov 23, 2009 at 5:25 PM, Peter Hrenka
<[email protected]> wrote:
> The new per-component operators Vec*Vec or Vec/Vec
> are not part the theory of vector spaces and might
> confuse people (they could think that the Vec*Vec-operator
> is the dot- or cross-Product which is both wrong).
>
> 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.

Yesterday evening I came to exactly the same conclusion.  The new
Vec*=Vec methods will lead to confusion, especially as V3 = V3*V2
will not compile as it computes the dot product and returns a float,
while V3 *= V2 will do a component wise multiplication which is
totally different - yet in standard C++ usage they should be directly
related.

The solution is to use an explicit naming and your suggestions look
pretty reasonable, although perhaps...

> 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.

Would be better :-)

Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to