-
Notifications
You must be signed in to change notification settings - Fork 0
/
ofxPhysicalOfPoint.h
executable file
·57 lines (37 loc) · 1.19 KB
/
ofxPhysicalOfPoint.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//
// ofxPhysicalOfPoint.h
// ofxPhysical
//
// Created by jvelazqueztraut on 06/05/13.
//
// masOTROS SRL
#pragma once
#include "ofxPhysical.h"
#include "ofMain.h"
class ofxPhysicalOfPoint : public ofxPhysical{
public:
ofxPhysicalOfPoint();
~ofxPhysicalOfPoint(){};
void update(float dt);
void draw(); //draws the current pos point in space
// apply for immediate effect ////////////////////////////////////////////////////////////////////
void setPosition( ofPoint );
void setPositionX(float);
void setPositionY(float);
void setPositionZ(float);
void reset();
// animated over time ///////////////////////////////////////////////////////////////////////////
///starts new animation to "where" regardless, using the current pos as the inital value
void animateTo( ofPoint where );
void animateToAfterDelay( ofPoint where, float delay );
void animateToIfFinished( ofPoint where );
//gets
ofPoint getCurrentPosition();
ofPoint getTargetPosition(){ return targetPoint_;}
ofPoint getOriginalPosition(){ return originalPoint_;}
private:
void startAfterWait();
ofPoint originalPoint_;
ofPoint targetPoint_;
ofPoint targetTempPoint_;
};