本文整理汇总了Java中com.google.vrtoolkit.cardboard.sensors.HeadTracker类的典型用法代码示例。如果您正苦于以下问题:Java HeadTracker类的具体用法?Java HeadTracker怎么用?Java HeadTracker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HeadTracker类属于com.google.vrtoolkit.cardboard.sensors包,在下文中一共展示了HeadTracker类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: init
import com.google.vrtoolkit.cardboard.sensors.HeadTracker; //导入依赖的package包/类
private void init(Context context) {
setEGLContextClientVersion(2);
setPreserveEGLContextOnPause(true);
WindowManager windowManager = (WindowManager) context
.getSystemService("window");
this.mHeadTracker = new HeadTracker(context);
this.mHmd = new HeadMountedDisplay(windowManager.getDefaultDisplay());
}
开发者ID:Zomega,项目名称:Cardboard,代码行数:11,代码来源:CardboardView.java
示例2: CardboardImplementation
import com.google.vrtoolkit.cardboard.sensors.HeadTracker; //导入依赖的package包/类
public CardboardImplementation(Activity activity) {
VirtualReality.implementation = this;
VirtualReality.head = new Head();
VirtualReality.body = new Body();
VirtualReality.renderer = new VirtualRealityRenderer();
headTracker = new HeadTracker(activity);
headTracker.startTracking();
HeadMountedDisplay hmd = new HeadMountedDisplay(activity.getWindowManager().getDefaultDisplay());
VirtualReality.headMountedDisplay = new CardboardHMD(hmd);
VirtualReality.distortionRenderer = new CardboardDistortionRenderer(hmd, new DistortionRenderer());
Gdx.app.addLifecycleListener(new LifecycleListener() {
@Override
public void resume() {
}
@Override
public void pause() {
}
@Override
public void dispose() {
headTracker.stopTracking();
}
});
}
开发者ID:nooone,项目名称:gdx-vr,代码行数:31,代码来源:CardboardImplementation.java
示例3: onCreate
import com.google.vrtoolkit.cardboard.sensors.HeadTracker; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// mSurfaceView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE
// | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
// | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
// | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
// | View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar
// | View.SYSTEM_UI_FLAG_IMMERSIVE);
mHeadTracker = new HeadTracker(this);
}
开发者ID:OnlyInAmerica,项目名称:StorySphere,代码行数:12,代码来源:ARActivity.java
示例4: CardboardProcessor
import com.google.vrtoolkit.cardboard.sensors.HeadTracker; //导入依赖的package包/类
public CardboardProcessor(Context context) {
tracker = HeadTracker.createFromContext(context);
tracker.startTracking();
}
开发者ID:caiocomandulli,项目名称:engine-stereo,代码行数:5,代码来源:CardboardProcessor.java
注:本文中的com.google.vrtoolkit.cardboard.sensors.HeadTracker类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论