AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
SyncQuaternion.cs
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License. See LICENSE in the project root for license information.
3 
4 using UnityEngine;
5 
6 namespace HoloToolkit.Sharing.SyncModel
7 {
12  public class SyncQuaternion : SyncObject
13  {
14  [SyncData] private SyncFloat x = null;
15  [SyncData] private SyncFloat y = null;
16  [SyncData] private SyncFloat z = null;
17  [SyncData] private SyncFloat w = null;
18 
19 #if UNITY_EDITOR
20  public override object RawValue
21  {
22  get { return Value; }
23  }
24 #endif
25 
26  public Quaternion Value
27  {
28  get { return new Quaternion(x.Value, y.Value, z.Value, w.Value); }
29  set
30  {
31  x.Value = value.x;
32  y.Value = value.y;
33  z.Value = value.z;
34  w.Value = value.w;
35  }
36  }
37 
38  public SyncQuaternion(string field) : base(field) { }
39  }
40 }
This class implements the float primitive for the syncing system. It does the heavy lifting to make a...
Definition: SyncFloat.cs:10
The SyncObject class is a container object that can hold multiple SyncPrimitives. ...
Definition: SyncObject.cs:21
This class implements the Quaternion object primitive for the syncing system. It does the heavy lifti...