public bool GetButtonBits(Motive.Tag tag, out int bits) { LiveObjectStorage storage; lock (lockObject) { if (!liveObjects.TryGetValue(Motive.GetName(tag), out storage)) { bits = 0; return(false); } else { bits = storage.bits; return(true); } } }
public bool GetPosition(Motive.Tag tag, out Vector3 position) { LiveObjectStorage storage; lock (lockObject) { if (!liveObjects.TryGetValue(Motive.GetName(tag), out storage)) { position = LiveObjectStorage.DEFAULT_VECTOR_POSITION; return(false); } else { position = storage.position; if (position.Equals(LiveObjectStorage.DEFAULT_VECTOR_POSITION)) { return(false); } else { return(true); } } } }
public bool GetRotation(Motive.Tag tag, out Quaternion rotation) { LiveObjectStorage storage; lock (lockObject) { if (!liveObjects.TryGetValue(Motive.GetName(tag), out storage)) { rotation = LiveObjectStorage.DEFAULT_QUATERNION_ROTATION; return(false); } else { rotation = storage.rotation; if (rotation.Equals(LiveObjectStorage.DEFAULT_QUATERNION_ROTATION)) { return(false); } else { return(true); } } } }
/////////////////////////////////////////////////////////////////////////// // // API functions // public bool IsLiveObject(Motive.Tag tag) { return(liveObjects.ContainsKey(Motive.GetName(tag))); }