view native/OpenHaptics/XYPad/HapticSceneFactory.h @ 1:46671fc7d649 tip

fixed "window" message bug and brought the message outside the haptic device monitor
author Fiore Martin <f.martin@qmul.ac.uk>
date Fri, 13 Mar 2015 13:02:16 +0000
parents 011caca7515a
children
line wrap: on
line source
/*
XYPad - a haptic xy-pad that uses the jHapticGUI library

Copyright (C) 2015  Queen Mary University of London (http://depic.eecs.qmul.ac.uk/)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
#include <memory>
#include "HapticScene.h"
#include "XYScene.h"

namespace jhapticgui{

	/**
	* The factory function is invoked when the haptic scene is created.
	* If nullptr is returned the haptic initialization fails.
	*/
	std::unique_ptr<HapticScene> makeHapticScene(void(*messageCallback) (const Message & m)){

		/* create your scene here */
		HapticScene *scene = new XYScene(messageCallback);
		return std::unique_ptr<HapticScene>(scene);
	}

}