Browse Source

minor changes

Rumei 5 years ago
parent
commit
ace626d450

+ 8 - 5
SketchAssistant/SketchAssistantWPF/MVP_Model.cs

@@ -516,9 +516,12 @@ namespace SketchAssistantWPF
 
         void getOptiTrackPosition(OptiTrack.Frame frame)
         {
-            optiTrackX = frame.Trackables[0].X;
-            optiTrackY = frame.Trackables[0].Y;
-            optiTrackZ = frame.Trackables[0].Z;
+            if(frame.Markers.Length > 1)
+            {
+                optiTrackX = frame.Markers[0].X;
+                optiTrackY = frame.Markers[0].Y;
+                optiTrackZ = frame.Markers[0].Z;
+            }
         }
 
         /// <summary>
@@ -528,7 +531,7 @@ namespace SketchAssistantWPF
         {
             if (cursorPositions.Count > 0) { previousCursorPosition = cursorPositions.Dequeue(); }
             else { previousCursorPosition = currentCursorPosition; }
-            if (optiTrackInUse)
+            if (optiTrackInUse) //drawing optiTrack
             {
                 if (CheckInsideDrawingZone(optiTrackZ))
                 {
@@ -570,7 +573,7 @@ namespace SketchAssistantWPF
                 //}
                 cursorPositions.Enqueue(currentCursorPosition);
             }
-            else
+            else //drawing normal
             {
                 cursorPositions.Enqueue(currentCursorPosition);
                 if (inDrawingMode && programPresenter.IsMousePressed())

+ 0 - 4
SketchAssistant/SketchAssistantWPF/MainWindow.xaml

@@ -220,10 +220,6 @@
         <local:CustomCanvas x:Name="LeftCanvas" Background="SlateGray" Grid.Column="2" Grid.Row="1" Height="auto" Grid.ColumnSpan="3"/>
         <Canvas Name="CanvasSeperator" Grid.Column="5" Grid.Row="1" Background="LightGray" />
         <InkCanvas x:Name="RightCanvas" Background="SlateGray" Grid.Column="6" Grid.Row="1" Height="auto" PreviewMouseDown="RightCanvas_MouseDown" MouseUp="RightCanvas_MouseUp" MouseMove="RightCanvas_MouseMove" Grid.ColumnSpan="2" StrokeCollected="RightCanvas_StrokeCollection" EditingMode="None"/>
-        <Canvas Name="OptitrackPosition" Background="Transparent">
-            <Ellipse Fill="#A9A9A9A9" Height="10" Width="10" Canvas.Left="-50" Canvas.Top="-50"/>
-            <Ellipse Fill="#FF000000" Height="4" Width="4" Canvas.Left="-50" Canvas.Top="-50" />
-        </Canvas>
 
 
         <DockPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="8">

+ 1 - 32
SketchAssistant/SketchAssistantWPF/SketchAssistantWPF.csproj

@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" 
-  xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <Import Project="..\packages\ReportGenerator.4.0.14\build\netstandard2.0\ReportGenerator.props" Condition="Exists('..\packages\ReportGenerator.4.0.14\build\netstandard2.0\ReportGenerator.props')" />
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
   <PropertyGroup>
@@ -167,36 +166,6 @@
     </BootstrapperPackage>
   </ItemGroup>
   <ItemGroup>
-    <Content Include="DLLs\ArduinoHub.h">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
-    <Content Include="BodyActuator.dll">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
-    <Content Include="DLLs\BodyActuator.h">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
-    <Content Include="DLLs\EAIHub.h">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
-    <Content Include="DLLs\eai_common.dll">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
-    <Content Include="DLLs\eai_serial.dll">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
-    <Content Include="DLLs\eai_winbluetooth.dll">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
-    <Content Include="DLLs\eai_winusb.dll">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
-    <Content Include="DLLs\TActionManager.dll">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
-    <Content Include="DLLs\TactorInterface.dll">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
     <Content Include="NPTrackingTools.dll">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>