tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

TransformsC.h (2160B)


      1 /** @file
      2    @brief Header controlling the OSVR transformation hierarchy
      3 
      4    Must be c-safe!
      5 
      6    @date 2015
      7 
      8    @author
      9    Sensics, Inc.
     10    <http://sensics.com/osvr>
     11 */
     12 
     13 /*
     14 // Copyright 2015 Sensics, Inc.
     15 //
     16 // Licensed under the Apache License, Version 2.0 (the "License");
     17 // you may not use this file except in compliance with the License.
     18 // You may obtain a copy of the License at
     19 //
     20 //        http://www.apache.org/licenses/LICENSE-2.0
     21 //
     22 // Unless required by applicable law or agreed to in writing, software
     23 // distributed under the License is distributed on an "AS IS" BASIS,
     24 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     25 // See the License for the specific language governing permissions and
     26 // limitations under the License.
     27 */
     28 
     29 #ifndef INCLUDED_TransformsC_h_GUID_5B5B7438_42D4_4095_E48A_90E2CC13498E
     30 #define INCLUDED_TransformsC_h_GUID_5B5B7438_42D4_4095_E48A_90E2CC13498E
     31 
     32 /* Internal Includes */
     33 #include <osvr/ClientKit/Export.h>
     34 #include <osvr/Util/APIBaseC.h>
     35 #include <osvr/Util/ReturnCodesC.h>
     36 #include <osvr/Util/ClientOpaqueTypesC.h>
     37 
     38 /* Library/third-party includes */
     39 /* none */
     40 
     41 /* Standard includes */
     42 /* none */
     43 
     44 OSVR_EXTERN_C_BEGIN
     45 
     46 /** @addtogroup ClientKit
     47    @{
     48 */
     49 
     50 /** @brief Updates the internal "room to world" transformation (applied to all
     51    tracker data for this client context instance) based on the user's head
     52    orientation, so that the direction the user is facing becomes -Z to your
     53    application. Only rotates about the Y axis (yaw).
     54 
     55    Note that this method internally calls osvrClientUpdate() to get a head pose
     56    so your callbacks may be called during its execution!
     57 
     58    @param ctx Client context
     59 */
     60 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
     61 osvrClientSetRoomRotationUsingHead(OSVR_ClientContext ctx);
     62 
     63 /** @brief Clears/resets the internal "room to world" transformation back to an
     64   identity transformation - that is, clears the effect of any other
     65   manipulation of the room to world transform.
     66 
     67    @param ctx Client context
     68 */
     69 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
     70 osvrClientClearRoomToWorldTransform(OSVR_ClientContext ctx);
     71 
     72 /** @} */
     73 OSVR_EXTERN_C_END
     74 
     75 #endif