Skip to content

Commit

Permalink
Alpha Commit
Browse files Browse the repository at this point in the history
Add all OSC data, Logo, Build.
  • Loading branch information
NiccoloGranieri committed Jun 7, 2018
1 parent ae34918 commit 7ec0b48
Show file tree
Hide file tree
Showing 11 changed files with 2,302 additions and 13 deletions.
Binary file added Assets/Reach Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions Builds/VisualStudio2017/ReachCpp_App.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1382,6 +1382,7 @@
<ClCompile Include="C:\JUCE\modules\juce_osc\juce_osc.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\JuceLibraryCode\BinaryData.cpp"/>
<ClCompile Include="..\..\JuceLibraryCode\include_juce_core.cpp"/>
<ClCompile Include="..\..\JuceLibraryCode\include_juce_data_structures.cpp"/>
<ClCompile Include="..\..\JuceLibraryCode\include_juce_events.cpp"/>
Expand Down Expand Up @@ -1817,11 +1818,14 @@
<ClInclude Include="C:\JUCE\modules\juce_osc\osc\juce_OSCTypes.h"/>
<ClInclude Include="C:\JUCE\modules\juce_osc\juce_osc.h"/>
<ClInclude Include="..\..\JuceLibraryCode\AppConfig.h"/>
<ClInclude Include="..\..\JuceLibraryCode\BinaryData.h"/>
<ClInclude Include="..\..\JuceLibraryCode\JuceHeader.h"/>
</ItemGroup>
<ItemGroup>
<None Include="..\..\Assets\Reach Logo.png"/>
<None Include="C:\JUCE\modules\juce_graphics\image_formats\jpglib\changes to libjpeg for JUCE.txt"/>
<None Include="C:\JUCE\modules\juce_graphics\image_formats\pnglib\libpng_readme.txt"/>
<None Include=".\icon.ico"/>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include=".\resources.rc"/>
Expand Down
15 changes: 15 additions & 0 deletions Builds/VisualStudio2017/ReachCpp_App.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<Filter Include="ReachCpp\Source">
<UniqueIdentifier>{4A184C18-03AC-5028-42F5-0B6E1D5C467B}</UniqueIdentifier>
</Filter>
<Filter Include="ReachCpp\Assets">
<UniqueIdentifier>{5350CBD8-6AD9-5781-A90C-DF81D928A09D}</UniqueIdentifier>
</Filter>
<Filter Include="ReachCpp">
<UniqueIdentifier>{3F140AB1-B5F7-9831-1927-56ED3D87FF2A}</UniqueIdentifier>
</Filter>
Expand Down Expand Up @@ -1540,6 +1543,9 @@
<ClCompile Include="C:\JUCE\modules\juce_osc\juce_osc.cpp">
<Filter>JUCE Modules\juce_osc</Filter>
</ClCompile>
<ClCompile Include="..\..\JuceLibraryCode\BinaryData.cpp">
<Filter>JUCE Library Code</Filter>
</ClCompile>
<ClCompile Include="..\..\JuceLibraryCode\include_juce_core.cpp">
<Filter>JUCE Library Code</Filter>
</ClCompile>
Expand Down Expand Up @@ -2841,17 +2847,26 @@
<ClInclude Include="..\..\JuceLibraryCode\AppConfig.h">
<Filter>JUCE Library Code</Filter>
</ClInclude>
<ClInclude Include="..\..\JuceLibraryCode\BinaryData.h">
<Filter>JUCE Library Code</Filter>
</ClInclude>
<ClInclude Include="..\..\JuceLibraryCode\JuceHeader.h">
<Filter>JUCE Library Code</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\Assets\Reach Logo.png">
<Filter>ReachCpp\Assets</Filter>
</None>
<None Include="C:\JUCE\modules\juce_graphics\image_formats\jpglib\changes to libjpeg for JUCE.txt">
<Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>
</None>
<None Include="C:\JUCE\modules\juce_graphics\image_formats\pnglib\libpng_readme.txt">
<Filter>JUCE Modules\juce_graphics\image_formats\pnglib</Filter>
</None>
<None Include=".\icon.ico">
<Filter>JUCE Library Code</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include=".\resources.rc">
Expand Down
Binary file added Builds/VisualStudio2017/icon.ico
Binary file not shown.
3 changes: 3 additions & 0 deletions Builds/VisualStudio2017/resources.rc
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ BEGIN
END

#endif

IDI_ICON1 ICON DISCARDABLE "icon.ico"
IDI_ICON2 ICON DISCARDABLE "icon.ico"
4 changes: 2 additions & 2 deletions JuceLibraryCode/AppConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
// BEGIN SECTION A

#ifndef JUCE_DISPLAY_SPLASH_SCREEN
#define JUCE_DISPLAY_SPLASH_SCREEN 1
#define JUCE_DISPLAY_SPLASH_SCREEN 0
#endif

#ifndef JUCE_REPORT_APP_USAGE
#define JUCE_REPORT_APP_USAGE 1
#define JUCE_REPORT_APP_USAGE 0
#endif

// END SECTION A
Expand Down
2,215 changes: 2,215 additions & 0 deletions JuceLibraryCode/BinaryData.cpp

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions JuceLibraryCode/BinaryData.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* =========================================================================================
This is an auto-generated file: Any edits you make may be overwritten!
*/

#pragma once

namespace BinaryData
{
extern const char* Reach_Logo_png;
const int Reach_Logo_pngSize = 155742;

// Number of elements in the namedResourceList and originalFileNames arrays.
const int namedResourceListSize = 1;

// Points to the start of a list of resource names.
extern const char* namedResourceList[];

// Points to the start of a list of resource filenames.
extern const char* originalFilenames[];

// If you provide the name of one of the binary resource variables above, this function will
// return the corresponding data and its size (or a null pointer if the name isn't found).
const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes);

// If you provide the name of one of the binary resource variables above, this function will
// return the corresponding original, non-mangled filename (or a null pointer if the name isn't found).
const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8);
}
1 change: 1 addition & 0 deletions JuceLibraryCode/JuceHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <juce_opengl/juce_opengl.h>
#include <juce_osc/juce_osc.h>

#include "BinaryData.h"

#if ! DONT_SET_USING_JUCE_NAMESPACE
// If your code uses a lot of JUCE classes, then this will obviously save you
Expand Down
12 changes: 7 additions & 5 deletions ReachCpp.jucer
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>

<JUCERPROJECT id="Oi0NjZ" name="ReachCpp" displaySplashScreen="1" reportAppUsage="1"
splashScreenColour="Dark" projectType="guiapp" version="1.0.0"
bundleIdentifier="com.IntegraLab.ReachCpp" includeBinaryInAppConfig="1"
<JUCERPROJECT id="Oi0NjZ" name="ReachCpp" splashScreenColour="Dark" projectType="guiapp"
version="1.0.0" bundleIdentifier="com.IntegraLab.ReachCpp" includeBinaryInAppConfig="1"
cppLanguageStandard="11" companyCopyright="Integra Lab" jucerVersion="5.3.2"
companyName="Integra Lab">
companyName="Integra Lab" reportAppUsage="0">
<MAINGROUP id="dja4JP" name="ReachCpp">
<GROUP id="{16C39C49-29A4-5EA4-64BB-9F3BADD97C81}" name="Source">
<FILE id="I4sx1e" name="LeapListener.cpp" compile="1" resource="0"
Expand All @@ -19,10 +18,13 @@
<FILE id="Thbeho" name="ReachLookAndFeel.h" compile="0" resource="0"
file="Source/ReachLookAndFeel.h"/>
</GROUP>
<GROUP id="{579CDD4D-4DB4-E100-752F-F75E275DD039}" name="Assets">
<FILE id="xUPRKY" name="Reach Logo.png" compile="0" resource="1" file="Assets/Reach Logo.png"/>
</GROUP>
</MAINGROUP>
<EXPORTFORMATS>
<VS2017 targetFolder="Builds/VisualStudio2017" windowsTargetPlatformVersion="10.0.16299.0"
externalLibraries="Leap.lib&#10;">
externalLibraries="Leap.lib&#10;" smallIcon="xUPRKY" bigIcon="xUPRKY">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="x64"
debugInformationFormat="ProgramDatabase" enablePluginBinaryCopyStep="0"
Expand Down
31 changes: 25 additions & 6 deletions Source/MainComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,31 @@ void MainContentComponent::timerCallback()
handedness = "/Righthand";
}

OSCMessage m = OSCMessage(handedness + "/palmTest");
m.addFloat32(hand.stabilizedPalmPosition().x);
m.addFloat32(hand.stabilizedPalmPosition().y);
m.addFloat32(hand.stabilizedPalmPosition().z);
sender.send(m);

OSCMessage oscPalm = OSCMessage(handedness + "/palm");
oscPalm.addFloat32(hand.stabilizedPalmPosition().x);
oscPalm.addFloat32(hand.stabilizedPalmPosition().y);
oscPalm.addFloat32(hand.stabilizedPalmPosition().z);
sender.send(oscPalm);

OSCMessage oscWrist = OSCMessage(handedness + "/wrist");
oscWrist.addFloat32(hand.wristPosition().x);
oscWrist.addFloat32(hand.wristPosition().y);
oscWrist.addFloat32(hand.wristPosition().z);
sender.send(oscWrist);

for (auto& finger : hand.fingers())
{
for (auto i = 0; i <= 3; i++)
{
auto boneType = static_cast<Leap::Bone::Type>(i);
auto bone = finger.bone(boneType);
OSCMessage oscJoint = OSCMessage(handedness + "/" + (String)finger.type() + "/joint" + (String)i);
oscJoint.addFloat32(bone.nextJoint().x);
oscJoint.addFloat32(bone.nextJoint().y);
oscJoint.addFloat32(bone.nextJoint().z);
sender.send(oscJoint);
}
}
}

repaint();
Expand Down

0 comments on commit 7ec0b48

Please sign in to comment.