Exemplo n.º 1
0
        public IEnumerator HologramInstantiationSettingsTest()
        {
            GameObject testObject      = new GameObject();
            GameObject testObjectChild = GameObject.CreatePrimitive(PrimitiveType.Capsule);

            testObjectChild.transform.parent = testObject.transform;

            HologramInstantiationSettings setting = new HologramInstantiationSettings
            {
                Name        = "TestObject",
                Manipulable = false,
                Rotation    = new Vector3(0, 180, 0),
                Position    = new Vector3(1f, 2f, 3f),
                Size        = 0.5f
            };

            HologramInstantiationSettings.Initialize(testObject, setting);

            Assert.AreEqual(testObject.name, "TestObject");
            Assert.AreEqual(testObject.transform.localScale, new Vector3(0.25f, 0.25f, 0.25f));
            Assert.AreEqual(testObject.transform.position, new Vector3(1f, 2f, 3f));
            Assert.AreEqual(testObject.transform.eulerAngles, new Vector3(0, 180, 0));
            Assert.AreEqual(testObject.GetComponent <BoundingBox>(), null);
            Assert.AreEqual(testObject.GetComponent <ManipulationHandler>(), null);

            yield return(null);
        }
    public void LoadModel()
    {
        HologramInstantiationSettings setting = new HologramInstantiationSettings
        {
            Manipulable = true,
            Rotation    = new Vector3(0, 180, 0),
            Position    = new Vector3(0.22f, -0.2f, 0.8f),
            Size        = 0.12f
        };

        HoloStorageClient.LoadHologram("ef051fa3-ccfd-4a3e-8bf6-3cd4c1c8dc23", setting);
    }
Exemplo n.º 3
0
    public void LoadHologram()
    {
        HologramList.sceneSwitchFlag  = true;
        HologramDisplayScene.patient  = patient;
        HologramDisplayScene.hologram = hologram;
        HologramInstantiationSettings setting = new HologramInstantiationSettings
        {
            Name      = "Loaded Model",
            Rotation  = new Vector3(0, 180, 0),
            Position  = new Vector3(0f, 0f, 2f),
            SceneName = "HologramDisplayScene",
            Size      = 0.5f
        };

        HoloStorageClient.LoadHologram(hologram.hid, setting);
    }
    void Start()
    {
        HologramInstantiationSettings setting = new HologramInstantiationSettings
        {
            Name        = ModelName,
            Position    = ModelPosition,
            Rotation    = ModelRotation,
            Manipulable = true,
            Size        = ModelSize
        };

        if (SceneName != string.Empty)
        {
            setting.SceneName = SceneName;
        }

        HoloStorageClient.LoadHologram(HologramID, setting);
    }