Esempio n. 1
0
        public bool SetControllerTouchPoint(float x, float y)
        {
            NativeVector3f nv3    = new NativeVector3f(new Vector3(x, y, 0f));
            NativeResult   result = NativeApi.NRSIMControllerSetTouchPoint(m_ControllerHandle, ref nv3);

            return(result == NativeResult.Success);
        }
Esempio n. 2
0
        public bool SetControllerAccelerometer(Vector3 accel)
        {
            NativeVector3f nv3    = new NativeVector3f(accel);
            NativeResult   result = NativeApi.NRSIMControllerSetAccelerometer(m_ControllerHandle, ref nv3);

            return(result == NativeResult.Success);
        }
Esempio n. 3
0
        public bool SetControllerPosition(Vector3 postion)
        {
            NativeVector3f nv3    = new NativeVector3f(postion);
            NativeResult   result = NativeApi.NRSIMControllerSetPosition(m_ControllerHandle, ref nv3);

            return(result == NativeResult.Success);
        }
Esempio n. 4
0
        public bool UpdateTrackablePlaneData(Vector3 centerPos, Quaternion centerQua, float extentX, float extentZ, UInt32 identifier, TrackingState state)
        {
            NativeVector3f pos    = new NativeVector3f(new Vector3(centerPos.x, centerPos.y, -centerPos.z));
            NativeVector4f qua    = new NativeVector4f(new Vector4(-centerQua.x, -centerQua.y, centerQua.z, centerQua.w));
            NativeResult   result = NativeApi.NRSIMTrackingUpdateTrackablePlaneData(m_TrackingHandle, ref pos, ref qua, extentX, extentZ, identifier, (int)state);

            return(result == NativeResult.Success);
        }
Esempio n. 5
0
        public bool SetHeadTrackingPose(Vector3 position, Quaternion rotation)
        {
            NativeVector3f nativeVector3F = new NativeVector3f(new Vector3(position.x, position.y, -position.z));
            NativeVector4f nativeVector4F = new NativeVector4f(new Vector4(rotation.x, rotation.y, -rotation.z, -rotation.w));
            NativeResult   result         = NativeApi.NRSIMTrackingSetHeadTrackingPose(m_TrackingHandle, ref nativeVector3F, ref nativeVector4F);

            return(result == NativeResult.Success);
        }
Esempio n. 6
0
        public Vector3 GetMag(int controllerIndex)
        {
            NativeVector3f vec3f  = new NativeVector3f();
            NativeResult   result = NativeApi.NRControllerStateGetMag(m_StateHandles[controllerIndex], ref vec3f);

            if (result == NativeResult.Success)
            {
                return(vec3f.ToUnityVector3());
            }
            return(Vector3.zero);
        }
Esempio n. 7
0
 public static extern NativeResult NRControllerStateGetMag(UInt64 controller_state_handle, ref NativeVector3f out_controller_mag);
Esempio n. 8
0
 public static extern NativeResult NRControllerStateGetAccel(UInt64 controller_state_handle, ref NativeVector3f out_controller_accel);
Esempio n. 9
0
 public NativeMat3f(Vector3 vec0, Vector3 vec1, Vector3 vec2)
 {
     column0 = new NativeVector3f(vec0);
     column1 = new NativeVector3f(vec1);
     column2 = new NativeVector3f(vec2);
 }
Esempio n. 10
0
 public static extern NativeResult NRSIMControllerSetTouchPoint(UInt64 controller_handle, ref NativeVector3f point);
Esempio n. 11
0
 public static extern NativeResult NRSIMControllerSetAccelerometer(UInt64 controller_handle, ref NativeVector3f accel);
Esempio n. 12
0
 public static extern NativeResult NRSIMControllerSetPosition(UInt64 controller_handle, ref NativeVector3f position);
Esempio n. 13
0
 public static extern NativeResult NRSIMTrackingUpdateTrackablePlaneData(UInt64 tracking_handle,
                                                                         ref NativeVector3f center_pos, ref NativeVector4f center_rotation,
                                                                         float extent_x, float extent_z, UInt32 identifier, int state);
Esempio n. 14
0
 public static extern NativeResult NRSIMTrackingSetHeadTrackingPose(UInt64 tracking_handle,
                                                                    ref NativeVector3f position, ref NativeVector4f rotation);