package com.example.rollingball.app;

import com.hackoeur.jglm.Vec3;

/**
 * Created by Tukasa on 2014/05/14.
 */
public class InputManager implements IUpdatetable
{

  private boolean _keyboard_mode = false;
  public Vec3 rotation = new Vec3();
  private Scene _scene;
  private float orientation;

  InputManager(Scene arg_scene)
  {
    _scene = arg_scene;
  }

  @Override
  public void update( final long delta_time_in_ns )
  {
    update_from_keyboard();
    update_from_orientation();
  }

  private void update_from_keyboard()
  {
    // 傾き入力状態なら何もせず抜ける
    if( _keyboard_mode == false)
      return;
    // 未実装
    throw new NotImplementedException();
  }

  private void update_from_orientation()
  {
    // キーボード入力状態なら何もせず抜ける
    if( _keyboard_mode == true )
      return;

    // 未実装
    orientation = _scene.scene_manager.view.activity.orientation_values;
  }


}

@@ -164,50 +164,8 @@
 %0A%7B%0A%0A
-  private boolean _keyboard_mode = false;%0A
   pu
@@ -186,21 +186,8 @@
 tion
- = new Vec3()
 ;%0A  
@@ -235,16 +235,18 @@
 entation
+%5B%5D
 ;%0A%0A  Inp
@@ -381,420 +381,138 @@
     
-update_from_keyboard();%0A    update_from_orientation();%0A  %7D%0A%0A  private void update_from_keyboard()%0A  %7B%0A    // %E5%82%BE%E3%81%8D%E5%85%A5%E5%8A%9B%E7%8A%B6%E6%85%8B%E3%81%AA%E3%82%89%E4%BD%95%E3%82%82%E3%81%9B%E3%81%9A%E6%8A%9C%E3%81%91%E3%82%8B%0A    if( _keyboard_mode == false)%0A      return;%0A    // %E6%9C%AA%E5%AE%9F%E8%A3%85%0A    throw new NotImplementedException();%0A  %7D%0A%0A  private void update_from_orientation()%0A  %7B%0A    // %E3%82%AD%E3%83%BC%E3%83%9C%E3%83%BC%E3%83%89%E5%85%A5%E5%8A%9B%E7%8A%B6%E6%85%8B%E3%81%AA%E3%82%89%E4%BD%95%E3%82%82%E3%81%9B%E3%81%9A%E6%8A%9C%E3%81%91%E3%82%8B%0A    if( _keyboard_mode == true )%0A      return;%0A%0A    // %E6%9C%AA%E5%AE%9F%E8%A3%85%0A    orientation = _scene.scene_manager.view.activity.
+orientation = _scene.scene_manager.view.activity.orientation_values;%0A    rotation = new Vec3( orientation%5B 0 %5D, orientation%5B 1 %5D, 
 orie
@@ -522,21 +522,20 @@
 tion
-_values
+%5B 2 %5D )
 ;%0A  %7D%0A%0A
-%0A
 %7D%0A

fix #24 InputManagerの修正