本文整理汇总了Java中com.asha.vrlib.MD360DirectorFactory类的典型用法代码示例。如果您正苦于以下问题:Java MD360DirectorFactory类的具体用法?Java MD360DirectorFactory怎么用?Java MD360DirectorFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MD360DirectorFactory类属于com.asha.vrlib包,在下文中一共展示了MD360DirectorFactory类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initVRLibrary
import com.asha.vrlib.MD360DirectorFactory; //导入依赖的package包/类
private void initVRLibrary() {
// new instance
mVRLibrary = MDVRLibrary.with(getContext())
.displayMode(MDVRLibrary.DISPLAY_MODE_GLASS)
.interactiveMode(MDVRLibrary.INTERACTIVE_MODE_CARDBORAD_MOTION)
.projectionMode(MDVRLibrary.PROJECTION_MODE_SPHERE)
.pinchConfig(new MDPinchConfig().setDefaultValue(0.7f).setMin(0.5f))
.pinchEnabled(true)
.directorFactory(new MD360DirectorFactory() {
@Override
public MD360Director createDirector(int index) {
return MD360Director.builder().setPitch(90).build();
}
})
.asVideo(new MDVRLibrary.IOnSurfaceReadyCallback() {
@Override
public void onSurfaceReady(Surface surface) {
// IjkMediaPlayer or MediaPlayer
mPlayerView.getPlayer().setSurface(surface);
}
})
.build(mGLSurfaceView);
mVRLibrary.setAntiDistortionEnabled(true);
}
示例2: on
import com.asha.vrlib.MD360DirectorFactory; //导入依赖的package包/类
@Override
public void on(Activity activity) {
super.on(activity);
// destroy prev main plugin
if( mMainPlugin != null){
mMainPlugin.destroy();
mMainPlugin = null;
}
mDirectors.clear();
MD360DirectorFactory factory = getStrategy().hijackDirectorFactory();
factory = factory == null ? mCustomDirectorFactory : factory;
for (int i = 0; i < MDVRLibrary.sMultiScreenSize; i++){
mDirectors.add(factory.createDirector(i));
}
}
示例3: on
import com.asha.vrlib.MD360DirectorFactory; //导入依赖的package包/类
@Override
public void on(Context context) {
super.on(context);
// destroy prev main plugin
if( mMainPlugin != null){
getGLHandler().post(new PluginDestroyTask(mMainPlugin));
mMainPlugin = null;
}
mDirectors.clear();
MD360DirectorFactory factory = getStrategy().hijackDirectorFactory();
factory = factory == null ? mCustomDirectorFactory : factory;
for (int i = 0; i < MDVRLibrary.sMultiScreenSize; i++){
mDirectors.add(factory.createDirector(i));
}
}
示例4: MDMultiFishEyePlugin
import com.asha.vrlib.MD360DirectorFactory; //导入依赖的package包/类
public MDMultiFishEyePlugin(MDMainPluginBuilder builder, float radius, boolean isHorizontal) {
mTexture = builder.getTexture();
mProgram = new MD360Program(builder.getContentType());
mBitmapProgram = new MD360Program(MDVRLibrary.ContentType.BITMAP);
mProjectionModeManager = builder.getProjectionModeManager();
mFixedDirector = new MD360DirectorFactory.OrthogonalImpl().createDirector(0);
mConverterObject3D = new MDMesh(radius, isHorizontal);
mDrawingCache = new MDDrawingCache();
}
示例5: MDBarrelDistortionLinePipe
import com.asha.vrlib.MD360DirectorFactory; //导入依赖的package包/类
public MDBarrelDistortionLinePipe(DisplayModeManager displayModeManager) {
mDisplayModeManager = displayModeManager;
mConfiguration = displayModeManager.getBarrelDistortionConfig();
mProgram = new MD360Program(MDVRLibrary.ContentType.BITMAP);
mDirector = new MD360DirectorFactory.OrthogonalImpl().createDirector(0);
object3D = new MDBarrelDistortionMesh();
mDrawingCache = new MDDrawingCache();
}
示例6: createVRLibrary
import com.asha.vrlib.MD360DirectorFactory; //导入依赖的package包/类
@Override
protected MDVRLibrary createVRLibrary() {
return MDVRLibrary.with(this)
.displayMode(MDVRLibrary.DISPLAY_MODE_NORMAL)
.interactiveMode(MDVRLibrary.INTERACTIVE_MODE_MOTION)
.asVideo(new MDVRLibrary.IOnSurfaceReadyCallback() {
@Override
public void onSurfaceReady(Surface surface) {
mMediaPlayerWrapper.setSurface(surface);
}
})
.ifNotSupport(new MDVRLibrary.INotSupportCallback() {
@Override
public void onNotSupport(int mode) {
String tip = mode == MDVRLibrary.INTERACTIVE_MODE_MOTION
? "onNotSupport:MOTION" : "onNotSupport:" + String.valueOf(mode);
Toast.makeText(VideoPlayerActivity.this, tip, Toast.LENGTH_SHORT).show();
}
})
.pinchConfig(new MDPinchConfig().setMin(1.0f).setMax(8.0f).setDefaultValue(0.1f))
.pinchEnabled(true)
.directorFactory(new MD360DirectorFactory() {
@Override
public MD360Director createDirector(int index) {
return MD360Director.builder().setPitch(90).build();
}
})
.projectionFactory(new CustomProjectionFactory())
.barrelDistortionConfig(new BarrelDistortionConfig().setDefaultEnabled(false).setScale(0.95f))
.build(findViewById(R.id.gl_view));
}
示例7: MDMultiFishEyePlugin
import com.asha.vrlib.MD360DirectorFactory; //导入依赖的package包/类
public MDMultiFishEyePlugin(MDMainPluginBuilder builder, float radius, MDDirection direction) {
mTexture = builder.getTexture();
mProgram = new MD360Program(builder.getContentType());
mBitmapProgram = new MD360Program(MDVRLibrary.ContentType.FBO);
mProjectionModeManager = builder.getProjectionModeManager();
mFixedDirector = new MD360DirectorFactory.OrthogonalImpl().createDirector(0);
mConverterObject3D = new MDMesh(radius, direction);
mDrawingCache = new MDDrawingCache();
}
示例8: MDBarrelDistortionLinePipe
import com.asha.vrlib.MD360DirectorFactory; //导入依赖的package包/类
public MDBarrelDistortionLinePipe(DisplayModeManager displayModeManager) {
mDisplayModeManager = displayModeManager;
mConfiguration = displayModeManager.getBarrelDistortionConfig();
mProgram = new MD360Program(MDVRLibrary.ContentType.FBO);
mDirector = new MD360DirectorFactory.OrthogonalImpl().createDirector(0);
object3D = new MDBarrelDistortionMesh();
mDrawingCache = new MDDrawingCache();
}
示例9: hijackDirectorFactory
import com.asha.vrlib.MD360DirectorFactory; //导入依赖的package包/类
@Override
protected MD360DirectorFactory hijackDirectorFactory() {
return new FixedDirectorFactory();
}
示例10: hijackDirectorFactory
import com.asha.vrlib.MD360DirectorFactory; //导入依赖的package包/类
@Override
protected MD360DirectorFactory hijackDirectorFactory() {
return new OrthogonalDirectorFactory();
}
示例11: hijackDirectorFactory
import com.asha.vrlib.MD360DirectorFactory; //导入依赖的package包/类
protected MD360DirectorFactory hijackDirectorFactory(){ return null; }