diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2012-12-21 18:05:07 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2012-12-21 18:05:07 (GMT) |
commit | edf85a10991e1eb041a24fa81ed330c3dbf4d151 (patch) | |
tree | cc58c32c353d35163355e4a921b0ff08784707aa | |
parent | 498f6f80e9ca01236ca1491596875ab7eb4cd8c3 (diff) | |
download | uscxml-edf85a10991e1eb041a24fa81ed330c3dbf4d151.zip uscxml-edf85a10991e1eb041a24fa81ed330c3dbf4d151.tar.gz uscxml-edf85a10991e1eb041a24fa81ed330c3dbf4d151.tar.bz2 |
Started SceneGraph invoker
-rw-r--r-- | CMakeLists.txt | 23 | ||||
-rw-r--r-- | src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp | 47 | ||||
-rw-r--r-- | src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.h | 43 |
3 files changed, 113 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index db87084..f6ce335 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -518,6 +518,29 @@ else() endif() +# OpenSceneGraph invoker + +find_package(OpenSceneGraph) +if (OPENSCENEGRAPH_FOUND) + file(GLOB_RECURSE OPENSCENEGRAPH_INVOKER + src/uscxml/plugins/invoker/graphics/openscenegraph/*.cpp + src/uscxml/plugins/invoker/graphics/openscenegraph/*.h) + if (BUILD_AS_PLUGINS) + add_library( + invoker_openscenegraph SHARED + ${OPENSCENEGRAPH_INVOKER}) + target_link_libraries(invoker_openscenegraph + ${OPENSCENEGRAPH_LIBRARIES} + uscxml) + set_target_properties(invoker_openscenegraph PROPERTIES FOLDER "Plugin Invoker") + else() + list (APPEND USCXML_FILES ${OPENSCENEGRAPH_INVOKER}) + list (APPEND USCXML_OPT_LIBS ${OPENSCENEGRAPH_LIBRARIES}) + endif() + +endif() + + # MILES modality components #find_package(MILES COMPONENTS core audio debug) diff --git a/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp b/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp new file mode 100644 index 0000000..33aba1d --- /dev/null +++ b/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp @@ -0,0 +1,47 @@ +#include "OSGInvoker.h" +#include <glog/logging.h> + +#ifdef BUILD_AS_PLUGINS +#include <Pluma/Connector.hpp> +#endif + +namespace uscxml { + +#ifdef BUILD_AS_PLUGINS +PLUMA_CONNECTOR +bool connect(pluma::Host& host) { + host.add( new OSGInvokerProvider() ); + return true; +} +#endif + +OSGInvoker::OSGInvoker() { +} + +OSGInvoker::~OSGInvoker() { +}; + +Invoker* OSGInvoker::create(Interpreter* interpreter) { + OSGInvoker* invoker = new OSGInvoker(); + invoker->_interpreter = interpreter; + return invoker; +} + +Data OSGInvoker::getDataModelVariables() { + Data data; + return data; +} + +void OSGInvoker::send(SendRequest& req) { +} + +void OSGInvoker::cancel(const std::string sendId) { +} + +void OSGInvoker::sendToParent(SendRequest& req) { +} + +void OSGInvoker::invoke(InvokeRequest& req) { +} + +}
\ No newline at end of file diff --git a/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.h b/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.h new file mode 100644 index 0000000..ed95a78 --- /dev/null +++ b/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.h @@ -0,0 +1,43 @@ +#ifndef OSGINVOKER_H_H6T4R8HU +#define OSGINVOKER_H_H6T4R8HU + +#include <uscxml/Interpreter.h> + +#ifdef BUILD_AS_PLUGINS +#include "uscxml/plugins/Plugins.h" +#endif + +namespace uscxml { + +class OSGInvoker : public Invoker { +public: + OSGInvoker(); + virtual ~OSGInvoker(); + virtual Invoker* create(Interpreter* interpreter); + + virtual std::set<std::string> getNames() { + std::set<std::string> names; + names.insert("3d"); + names.insert("scenegraph"); + names.insert("http://uscxml.tk.informatik.tu-darmstadt.de/#3d"); + return names; + } + + virtual Data getDataModelVariables(); + virtual void send(SendRequest& req); + virtual void cancel(const std::string sendId); + virtual void invoke(InvokeRequest& req); + virtual void sendToParent(SendRequest& req); + +protected: + std::string _invokeId; +}; + +#ifdef BUILD_AS_PLUGINS +PLUMA_INHERIT_PROVIDER(OSGInvoker, Invoker); +#endif + +} + + +#endif /* end of include guard: OSGINVOKER_H_H6T4R8HU */ |