Scale ofVec3f using ofVec3f

Hi all,
I’m getting confused coz I can’t find a very simple function.
Do we have anything to scale a ofVec3f using another ofVec3f? something like:

ofPoint.scale( ofVec3f scale )

I know I could do it in 3 steps… like:


But doesn’t it make sense to have it in one method? or I’m looking for the wrong name?

p1*p2 ?

1 Like

ouch… right!

:slight_smile: you can also do p1 *= p2

I was translating code where I was doing transformations to a mesh using ofScale()… but now transforming its points. So I was reading all ofVec3f methods and I couldn’t believe that scale() was not there…
So now the thing looks like:

point *= size;
point += translation;

I could argue that scale(size) and translate() seems more natural to me. But I understand that many would say that it is just stupid … probably its because I’m used to other tools…
(yeah I got blushed when I read you answer hahahah)