コード例 #1
0
        public bool SetControllerRotation(Quaternion quaternion)
        {
            NativeVector4f nv4    = new NativeVector4f(new Vector4(quaternion.x, quaternion.y, -quaternion.z, -quaternion.w));
            NativeResult   result = NativeApi.NRSIMControllerSetRotation(m_ControllerHandle, ref nv4);

            return(result == NativeResult.Success);
        }
コード例 #2
0
 public NativeMat4f(Matrix4x4 m)
 {
     column0 = new NativeVector4f(m.GetColumn(0));
     column1 = new NativeVector4f(m.GetColumn(1));
     column2 = new NativeVector4f(m.GetColumn(2));
     column3 = new NativeVector4f(m.GetColumn(3));
 }
コード例 #3
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);
        }
コード例 #4
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);
        }
コード例 #5
0
 public static extern NativeResult NRSIMControllerSetRotation(UInt64 controller_handle, ref NativeVector4f rotation);
コード例 #6
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);
コード例 #7
0
 public static extern NativeResult NRSIMTrackingSetHeadTrackingPose(UInt64 tracking_handle,
                                                                    ref NativeVector3f position, ref NativeVector4f rotation);