ofPath rotation

void testApp::setup()
	path.arc(ofVec3f(), 100, 100, 0.0f, 90.0f, true);
	path.arc(ofVec3f(), 50, 50, 90.0f, 0.0f, false);

	path.rotate(90, ofVec3f(0,1,0));

void testApp::draw()



This should rotate the of path in the Y axis, moving it from XY plane to ZY plane, but it seems to rotate always around the Z axis.

mmh, yeah this seems to be a bug. if you use any other shape this should work, but in the case of arc the only thing that the path stores is it center and the angle so it’ll only work in 2d really and the rotation won’t be applied correctly. not sure how we could fix this without making the internals of ofPath too complicated.

If you use the path in polylines mode instead of commands it’ll work though, you just need to call:


that will decompose the path in vertices and what will be rotated now will be the vertices themselves instead of the primitives that describe the path