Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Can't create ofPolyline from ofVec2f

$
0
0

@javl wrote:

Before I create an issue on Github, I want to check if I might be doing something wrong.

The docs for ofPolyline say:
ofPolyLine(...)
Creates an ofPolyline from a vector of ofVec2f or ofPoint objects.

This works:
ofPoint pointa(0, 0);
ofPoint pointb(100, 100);
vector<ofPoint> somePoints;
somePoints.push_back(pointa);
somePoints.push_back(pointb);
ofPolyline line(somePoints); // this is ok

But doing the same with ofVec2f crashes on the last line:

ofVec2f pointa(0, 0);
ofVec2f pointb(100, 100);
vector<ofVec2f> somePoints;
somePoints.push_back(pointa);
somePoints.push_back(pointb);
ofPolyline line(somePoints); // crashes on this line

Am I missing something?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles