Example #1
0
void Border::set(vector<ofPoint> &pts, float spacing){
	
	if(spacing!=NULL){
		
		ofPolyline temp;
		temp.addVertexes(pts);
		temp = ofGetResampledSpacing(temp, spacing);
		addVertexes(temp.getVertices());
	}
	else {
		addVertexes(pts);
	}
	
	color.set(ofRandom(255), ofRandom(255), ofRandom(255));
	
	computeNormals();
}
ofPolyline ofGetResampledCount(const ofPolyline& polyline, int count) {
	float perimeter = polyline.getPerimeter();
	return ofGetResampledSpacing(polyline, perimeter / count);
}