how to move shapes position?

Hello, Im new to of:)
I wrote a class that draws something with ofBeginShape() ~~ ofvertexes ~~ ofEndShape()
I wanted to make that object in different positions, which the best thing I could think of was ofTranslate
so I would put parameter to ofTranslate every time I make objects
but it acts globally so that if I make 4 objects, the axis are translated four times

probably it is my bad programming but is there a better way to do this?


yeah - ofTranslate is the easiest - you just need to wrap it in ofPushMatrix/ofPopMatrix

void testApp::draw(){  
		ofTranslate(100, 100, 0);  
		ofRect(0, 0, 20, 20);  
	ofRect(0, 0, 20, 20); //same coordinates as above but not translated  

thank you very much for your response!:slight_smile: