AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
SyncVector3.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 SyncVector3 : SyncObject
13  {
14  [SyncData] private SyncFloat x = null;
15  [SyncData] private SyncFloat y = null;
16  [SyncData] private SyncFloat z = null;
17 
18 #if UNITY_EDITOR
19  public override object RawValue
20  {
21  get { return Value; }
22  }
23 #endif
24 
25  public Vector3 Value
26  {
27  get { return new Vector3(x.Value, y.Value, z.Value); }
28  set
29  {
30  x.Value = value.x;
31  y.Value = value.y;
32  z.Value = value.z;
33  }
34  }
35 
36  public SyncVector3(string field) : base(field) { }
37  }
38 }
This class implements the float primitive for the syncing system. It does the heavy lifting to make a...
Definition: SyncFloat.cs:10
This class implements the Vector3 object primitive for the syncing system. It does the heavy lifting ...
Definition: SyncVector3.cs:12
The SyncObject class is a container object that can hold multiple SyncPrimitives. ...
Definition: SyncObject.cs:21