Example #1
0
void TrackpadCam::setup(Renderer& theRenderer) {
	renderer = &theRenderer;
	trackpad_init();
	trackpad_set_mouse_scroll_callback(scroll_callback);
	trackpad_set_magnify_callback(zoom_callback);
	trackpad_set_rotate_callback(rotate_callback);
	trackpad_set_mouse_move_callback(mouse_move_callback);
	trackpad_set_left_mouse_down_callback(left_mouse_down_callback);
	trackpad_set_left_mouse_up_callback(left_mouse_up_callback);
	trackpad_set_left_mouse_dragged_callback(mouse_dragged_callback);
	TrackpadCam::instance = this;
}
Example #2
0
//--------------------------------------------------------------
void testApp::setup(){
	ofSetVerticalSync(true);
	mesh.load("lofi-bunny.ply");
	
	trackpad_set_begin_gesture_callback(trackpad_begin_gesture);
	trackpad_set_end_gesture_callback(trackpad_end_gesture);
	
	trackpad_set_rotate_callback(trackpad_rotate);
	trackpad_set_swipe_callback(trackpad_swipe);
	trackpad_set_magnify_callback(trackpad_magnify);
	trackpad_set_mouse_move_callback(trackpad_mouse_move);
	trackpad_set_mouse_scroll_callback(trackpad_mouse_scroll);
	
	trackpad_set_left_mouse_down_callback(trackpad_left_mouse_down);
	trackpad_set_left_mouse_up_callback(trackpad_left_mouse_up);
	trackpad_set_left_mouse_dragged_callback(trackpad_left_mouse_dragged);
	
	trackpad_set_right_mouse_down_callback(trackpad_right_mouse_down);
	trackpad_set_right_mouse_up_callback(trackpad_right_mouse_up);
	trackpad_set_right_mouse_dragged_callback(trackpad_right_mouse_dragged);
	
	trackpad_init();
}