Commit 5a29850b authored by Kevin Dang's avatar Kevin Dang

some slight changes to previous code

parent 75219f04
No preview for this file type
......@@ -68,19 +68,17 @@ void lightDrawing::draw() {
void lightDrawing::clearAllLines() {
drawLine.clear();
void lightDrawing::clearPreviousLine() {
// only allows you to delete the last added element
if (drawLine.size() > 0) { // you need this condition or the program will crash
drawLine.pop_back();
}
}
void lightDrawing::mouseDragged(ofVec3f _pos) {
drawLine[drawLine.size() - 1].addVertex(_pos);
drawLine[drawLine.size() - 1].addVertex(_pos);
}
......@@ -91,13 +89,10 @@ void lightDrawing::mouseRPressed() {
void lightDrawing::mousePressed(ofVec3f _pos) {
// drawLine.push_back(ofPolyline());
rightMouseButtonPressed = true;
currentPolyline.curveTo(_pos.x,_pos.y,_pos.z);
currentPolyline.curveTo(_pos.x,_pos.y,_pos.z);
lastPoint.set(_pos.x,_pos.y,_pos.z);
}
......
......@@ -21,7 +21,7 @@ public:
void setup();
void draw();
void clearAllLines();
void clearPreviousLine();
void mouseDragged(ofVec3f _pos);
void mouseRPressed();
......@@ -36,15 +36,12 @@ public:
void mousePressed(ofVec3f _pos);
void mouseReleased(ofVec3f _pos);
vector <ofSpherePrimitive> storeSphere;
ofSpherePrimitive sphere;
void bubblesetup();
void bubbledraw();
void createbubble(ofVec3f _pos);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment