Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
01_HelloWorld
02_HelloWorldAdvanced
03_Mutant
04_SpatialMapping
05_Physics
06_CrowdNavigation
07_CognitiveServices
README.md
Samples.sln

README.md

UrhoSharp HoloLens Samples

These samples use the UrhoSharp.SharpReality package and show how you can use Urho to create Holographic applications with HoloLens.

Screenshot

The above is the Physics sample in this directory.

Quick start

In order to start doing your holograms you can try our Visual Studio project template. It contains a basic scene and a few assets to get started: vstemplate

Making HoloLens applications with Urho is trivial, all you have to do is this:

using Urho;
using Urho.Actions;
using Urho.Holographics;
using Urho.SharpReality;
using Urho.Shapes;
using Windows.ApplicationModel.Core;

internal class Program
{
    [MTAThread]
    static void Main() => CoreApplication.Run(
        new UrhoAppViewSource<HelloWorldApplication>(
            new ApplicationOptions("Data")));
}

public class MyHoloApp : StereoApplication
{
    public MyHoloApp(ApplicationOptions opts) : base(opts) { }

    protected override async void Start()
    {
        // base.Start() creates a basic Scene
        base.Start();
        
        // Create a node
        boxNode = Scene.CreateChild();
        boxNode.Rotation = new Quaternion(0, 45, 0);
        boxNode.Position = new Vector3(0, 0, 2); //2 meters 
        boxNode.SetScale(0.3f); //30cm*30cm*30cm

        // Attach a StaticModel to the node:
        var model = boxNode.CreateComponent<StaticModel>();
        model.Model = CoreAssets.Models.Box;
        mode.SetMaterial(Material.FromColor(Color.Yellow));
        
        boxNode.RunActions(new RepeatForever(new RotateBy(1f, 0, 90, 0)));
    }
}

Screenshot