Function gvr_sys::gvr_controller_apply_arm_model [] [src]

pub unsafe extern "C" fn gvr_controller_apply_arm_model(
    api: *mut gvr_controller_context,
    handedness: i32,
    behavior: i32,
    head_space_from_start_space_rotation: gvr_mat4f
)

Sets up arm model with user's handedness, gaze behavior and head rotation. This setting needs to be applied for every frame. User preferences of handedness and gaze behavior can be changed as needed in a sequence of frames. This needs to be called before gvr_controller_state_update() to apply arm model. GVR_CONTROLLER_ENABLE_ARM_MODEL flag needs to be enabled to apply arm model.

@param api Pointer to a gvr_controller_context. @param handedness User's preferred handedness (GVR_CONTROLLER_RIGHT_HANDED or GVR_CONTROLLER_LEFT_HANDED). Arm model will assume this is the hand that is holding the controller and position the arm accordingly. @param behavior User's preferred gaze behavior (SYNC_GAZE / FOLLOW_GAZE / IGNORE_GAZE). Arm model uses this to determine how the body rotates as gaze direction (i.e. head rotation) changes. @param head_space_from_start_space_rotation User's head rotation with respect to start space.