Exemplo n.º 1
0
//----------------------------------------
void ofEasyCam::setEvents(ofCoreEvents & _events){
	// If en/disableMouseInput were called within ofApp::setup(),
	// bMouseInputEnabled will tell us about whether the camera
	// mouse input needs to be initialised as enabled or disabled.
	// we will still set `events`, so that subsequent enabling
	// and disabling can work.

	// we need a temporary copy of bMouseInputEnabled, since it will 
	// get changed by disableMouseInput as a side-effect.
	bool wasMouseInputEnabled = bMouseInputEnabled || !events;
	disableMouseInput();
	events = &_events;
	if (wasMouseInputEnabled) {
		// note: this will set bMouseInputEnabled to true as a side-effect.
		enableMouseInput();
	}
	bEventsSet = true;
}
Exemplo n.º 2
0
//----------------------------------------
ofEasyCamExt::~ofEasyCamExt(){
	disableMouseInput();
}
Exemplo n.º 3
0
//----------------------------------------
ofEasyCam::~ofEasyCam(){
	disableMouseInput();
}
Exemplo n.º 4
0
void ofEasyCam::setEvents(ofCoreEvents & _events){
	disableMouseInput();
	bEventsSet = true;
	events = &_events;
	enableMouseInput();
}
Exemplo n.º 5
0
//----------------------------------------
Camera::~Camera(){
	disableMouseInput();
}
Exemplo n.º 6
0
//----------------------------------------
ofx2DCam::~ofx2DCam(){
    disableMouseInput();
}