Skip to content

Commit

Permalink
[protocols] Move leapmotion support out of there
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed May 14, 2024
1 parent 0966d93 commit 8c04bfa
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 460 deletions.
44 changes: 0 additions & 44 deletions cmake/FindLeapMotion.cmake

This file was deleted.

8 changes: 0 additions & 8 deletions cmake/OssiaDeps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,6 @@ if(OSSIA_PROTOCOL_LIBMAPPER)
endif()
endif()

if(OSSIA_PROTOCOL_LEAPMOTION)
include(deps/leapmotion)

if(NOT LeapMotion_FOUND)
set(OSSIA_PROTOCOL_LEAPMOTION FALSE CACHE INTERNAL "")
endif()
endif()

if(OSSIA_ENABLE_FFT)
if(OSSIA_ENABLE_FFTW)
include(deps/fftw)
Expand Down
2 changes: 0 additions & 2 deletions cmake/OssiaOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ option(OSSIA_PROTOCOL_HTTP "Enable HTTP protocol" ON) # Requires Qt
option(OSSIA_PROTOCOL_WEBSOCKETS "Enable WebSockets protocol" OFF) # Requires Qt
option(OSSIA_PROTOCOL_SERIAL "Enable Serial port protocol" OFF) # Requires Qt
option(OSSIA_PROTOCOL_PHIDGETS "Enable Phidgets protocol" OFF) # Requires Phidgets library
option(OSSIA_PROTOCOL_LEAPMOTION "Enable Leapmotion protocol" OFF) # Requires LeapMotion Orion library
option(OSSIA_PROTOCOL_JOYSTICK "Enable Joystick protocol" ON) # Requires SDL2 library
option(OSSIA_PROTOCOL_WIIMOTE "Enable Wiimote Protocol" ON) #use wiiuse
option(OSSIA_PROTOCOL_ARTNET "Enable artnet protocol" ON) #use libartnet
Expand All @@ -85,7 +84,6 @@ set(OSSIA_AVAILABLE_PROTOCOLS
OSC MINUIT OSCQUERY
HTTP WEBSOCKETS SERIAL
PHIDGETS
LEAPMOTION
JOYSTICK
WIIMOTE
ARTNET
Expand Down
1 change: 0 additions & 1 deletion cmake/deps/leapmotion.cmake
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
find_package(LeapMotion)
4 changes: 1 addition & 3 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ if(OSSIA_PROTOCOL_OSCQUERY)
ossia_add_example(network_oscquery_recorder "${CMAKE_CURRENT_SOURCE_DIR}/Network/asio/OSCQuery_recorder.cpp")

ossia_add_example(pd_controller "${CMAKE_CURRENT_SOURCE_DIR}/Network/PdController.cpp")
if(OSSIA_PROTOCOL_LEAPMOTION)
ossia_add_example(network_leapmotion_oscquery "${CMAKE_CURRENT_SOURCE_DIR}/Network/LeapToOscQuery.cpp")
endif()

if(OSSIA_PROTOCOL_LIBMAPPER)
ossia_add_example(network_libmapper "${CMAKE_CURRENT_SOURCE_DIR}/Network/Libmapper.cpp")
endif()
Expand Down
18 changes: 0 additions & 18 deletions examples/Network/LeapToOscQuery.cpp
Original file line number Diff line number Diff line change
@@ -1,18 +0,0 @@
#include <ossia/network/local/local.hpp>
#include <ossia/network/oscquery/oscquery_server.hpp>
#include <ossia/protocols/leapmotion/leapmotion_device.hpp>

int main()
{
auto ctx = ossia::net::create_network_context();
auto proto = std::make_unique<ossia::net::multiplex_protocol>();
auto& multiplex = *proto;
ossia::net::generic_device leap{std::move(proto), "leapmotion"};
leap.set_echo(true);

multiplex.expose_to(
std::make_unique<ossia::oscquery::oscquery_server_protocol>(15554, 1349));
multiplex.expose_to(std::make_unique<ossia::leapmotion_protocol>(ctx));

ossia::net::run_network_context(*ctx);
}
3 changes: 0 additions & 3 deletions src/ossia-config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@
#cmakedefine OSSIA_PROTOCOL_HTTP
#cmakedefine OSSIA_PROTOCOL_WEBSOCKETS
#cmakedefine OSSIA_PROTOCOL_SERIAL
#cmakedefine OSSIA_PROTOCOL_PHIDGETS
#cmakedefine OSSIA_PROTOCOL_LEAPMOTION
#cmakedefine OSSIA_PROTOCOL_JOYSTICK
#cmakedefine OSSIA_PROTOCOL_WIIMOTE
#cmakedefine OSSIA_PROTOCOL_ARTNET
#cmakedefine OSSIA_PROTOCOL_LIBMAPPER

// Additional features
#cmakedefine OSSIA_DNSSD
Expand Down
10 changes: 0 additions & 10 deletions src/ossia-max/src/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
#if defined(OSSIA_PROTOCOL_PHIDGETS)
#include <ossia/network/phidgets/phidgets_protocol.hpp>
#endif
#if defined(OSSIA_PROTOCOL_LEAPMOTION)
#include <ossia/network/leapmotion/leapmotion_device.hpp>
#endif

using namespace ossia::max_binding;

Expand Down Expand Up @@ -477,13 +474,6 @@ void device::expose(device* x, t_symbol*, long argc, t_atom* argv)
}
#endif

#if defined(OSSIA_PROTOCOL_LEAPMOTION)
else if(protocol == "leapmotion")
{
multiplex.expose_to(std::make_unique<ossia::leapmotion_protocol>());
}
#endif

else
{
object_error((t_object*)x, "Unknown protocol: %s", protocol.c_str());
Expand Down
Loading

0 comments on commit 8c04bfa

Please sign in to comment.