示例#1
0
        /// <summary>
        /// Returns the analog data of the given tracker and the given channel (and channel + 1) as a vector.
        /// </summary>
        /// <param name="tracker">Tracking device (e.g. DTrack)</param>
        /// <param name="channel"></param>
        /// <returns></returns>
        public Vector2 GetAnalogVec(string tracker, int channel)
        {
            var address = GetTrackerAdress(tracker);

            return(new Vector2
            {
                x = (float)VRPN_NativeBridge.Analog(address, channel),
                y = (float)VRPN_NativeBridge.Analog(address, channel + 1)
            });
        }
示例#2
0
 /// <summary>
 /// Returns the current analog value at the given channel.
 /// </summary>
 /// <param name="tracker">Tracking device (e.g. DTrack)</param>
 /// <param name="channel"></param>
 /// <returns></returns>
 public double GetAnalog(string tracker, int channel)
 {
     return(VRPN_NativeBridge.Analog(GetTrackerAdress(tracker), channel));
 }
示例#3
0
 /// <summary>
 /// Returns the rotation of the given tracker at the given channel.
 /// </summary>
 /// <param name="tracker">Tracking device (e.g. DTrack)</param>
 /// <param name="channel"></param>
 /// <returns></returns>
 public Quaternion GetRotation(string tracker, int channel)
 {
     return(VRPN_NativeBridge.TrackerQuat(GetTrackerAdress(tracker), channel));
 }
示例#4
0
 /// <summary>
 /// Returns the current status of the given button at the given channel.
 /// </summary>
 /// <param name="tracker">Tracking device (e.g. DTrack)</param>
 /// <param name="channel"></param>
 /// <returns></returns>
 public bool IsButtonPressed(string tracker, int channel)
 {
     return(VRPN_NativeBridge.Button(GetTrackerAdress(tracker), channel));
 }
示例#5
0
 /// <summary>
 /// Returns the position of the given tracker at the given channel.
 /// </summary>
 /// <param name="tracker">Tracking device (e.g. DTrack)</param>
 /// <param name="channel"></param>
 /// <returns></returns>
 public Vector3 GetPosition(string tracker, int channel)
 {
     return(VRPN_NativeBridge.TrackerPos(GetTrackerAdress(tracker), channel));
 }