Reputation: 9130
I'm learning Openframeworks and have found that these two classes are often used to represent sometimes vectors and sometimes points. What are the reasons for using one over the other?
Upvotes: 3
Views: 1792
Reputation: 1683
An ofPoint
is in fact just an ofVec3f
. It is defined like this:
typedef ofVec3f ofPoint;
(See here for the code)
I think it's just a question of convenience. When you want to represent a point in a 3-dimensional space, it's more explicit to use an ofPoint
than an ofVec3f
and it makes your code more readable.
Upvotes: 5