Skip to content

Commit

Permalink
add coordinate scene v0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
qian256 committed May 16, 2017
1 parent f0e3484 commit 154d23a
Show file tree
Hide file tree
Showing 9 changed files with 964 additions and 30 deletions.
12 changes: 7 additions & 5 deletions ARToolKitUWP-Unity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,29 @@ Unity3D package interfacing ARToolKitUWP, with C# scripts, pre-built plugin, cus

Author: [Long Qian](http://longqian.me/aboutme)

Date: 2017-05-13
Date: 2017-05-15

## Scripts

- ```ARUWPNative.cs``` directly interfaces with ARToolKitUWP wrapper. It defines the entry point of native functions with parameter correctly marshaled, and various constants used for tracking configuration.
- ```ARUWPUtils.cs``` provides various utility functions serving the package.
- ```ARUWPMarker.cs``` defines a marker to be tracked by ARToolKitUWP, and relates tracking result with particular GameObjects in the scene.
* ```Editor/ARUWPMarkerEditor.cs``` customizes the Unity inspector of ARUWPMarker objects.
- ```ARUWPVideo.cs``` controls the video pipeline that runs asychronously with Unity UI. It makes uses of Windows.MediaCapture APIs that are part of Universal Windows SDK.
* ```Editor/ARUWPVideoEditor.cs``` customizes the Unity inspector of ARUWPVideo objects.
- ```ARUWPController.cs``` takes the overall control of the application, including marker management, video capture management, configures the behavior of native ARToolKitUWP tracking.
* ```Editor/ARUWPControllerEditor.cs``` customizes the Unity inspector of ARUWPController objects.
- ```ARUWPUtils.cs``` provides various utility functions serving the package.

## Streaming Assets
Files in this folder are shipped with the application, which means they will also be accessible during runtime. Marker configurations, pattern definition, camera calibration files are placed here.

```hololens896x504.dat``` is the camera calibration file of my HoloLens locatable camera. Details can be found in this [repository](https://github.com/qian256/HoloLensCamCalib/tree/master).
```hololens896x504.dat``` is the camera calibration file of my HoloLens locatable camera. Details can be found in [HoloLensCamCalib](https://github.com/qian256/HoloLensCamCalib/tree/master).

## How to use the scripts?

- [ARToolKitUWP controller options v0.2]()
- [ARToolKitUWP marker options v0.2]()
- [ARUWPController options v0.2](http://longqian.me/2017/05/15/hololens-artoolkit-controller-v02/)
- [ARUWPMarker options v0.2](http://longqian.me/2017/05/15/hololens-artoolkit-marker-v02/)
- [ARUWPVideo options v0.2](http://longqian.me/2017/05/15/hololens-artoolkit-video-v02/)



Expand Down
32 changes: 21 additions & 11 deletions HoloLensARSample/Assets/Sample/ClickerInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,36 @@
/// </summary>
public class ClickerInput : MonoBehaviour {

/// <summary>
/// Class and object identifier for logging. [internal use]
/// </summary>
private string TAG = "ClickerInput";

/// <summary>
/// Customized Event class
/// </summary>
[System.Serializable]
public class EventClickerClick : UnityEvent { };

/// <summary>
/// Clicker event: clicker press, or air tap. [public use]
/// </summary>
public EventClickerClick eventClickerClick;

/// <summary>
/// Singleton object instance. [internal use]
/// </summary>
public static ClickerInput Instance { get; private set; }

/// <summary>
/// UnityEngine.VR.WSA.Input class to manage click detection. [internal use]
/// </summary>
GestureRecognizer recognizer;

// Use this for initialization
/// <summary>
/// Unity Monobehavior function. Initialize the click detection, and callback registration.
/// [internal use]
/// </summary>
void Awake() {
Instance = this;

Expand All @@ -61,14 +80,5 @@ void Awake() {
};
recognizer.StartCapturingGestures();
}

// Use this for initialization
void Start() {
;
}

// Update is called once per frame
void Update() {
;
}

}
Loading

0 comments on commit 154d23a

Please sign in to comment.