当前位置: 首页>>代码示例>>Java>>正文


Java MD360DirectorFactory类代码示例

本文整理汇总了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);
}
 
开发者ID:wheat7,项目名称:VRPlayer,代码行数:25,代码来源:VRPlayerView.java

示例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));
    }
}
 
开发者ID:RealWei,项目名称:md360,代码行数:20,代码来源:ProjectionModeManager.java

示例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));
    }
}
 
开发者ID:ashqal,项目名称:MD360Player4Android,代码行数:20,代码来源:ProjectionModeManager.java

示例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();
}
 
开发者ID:RealWei,项目名称:md360,代码行数:12,代码来源:MDMultiFishEyePlugin.java

示例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();
}
 
开发者ID:RealWei,项目名称:md360,代码行数:9,代码来源:MDBarrelDistortionLinePipe.java

示例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));
}
 
开发者ID:ashqal,项目名称:MD360Player4Android,代码行数:32,代码来源:VideoPlayerActivity.java

示例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();
}
 
开发者ID:ashqal,项目名称:MD360Player4Android,代码行数:12,代码来源:MDMultiFishEyePlugin.java

示例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();
}
 
开发者ID:ashqal,项目名称:MD360Player4Android,代码行数:9,代码来源:MDBarrelDistortionLinePipe.java

示例9: hijackDirectorFactory

import com.asha.vrlib.MD360DirectorFactory; //导入依赖的package包/类
@Override
protected MD360DirectorFactory hijackDirectorFactory() {
    return new FixedDirectorFactory();
}
 
开发者ID:RealWei,项目名称:md360,代码行数:5,代码来源:StereoSphereProjection.java

示例10: hijackDirectorFactory

import com.asha.vrlib.MD360DirectorFactory; //导入依赖的package包/类
@Override
protected MD360DirectorFactory hijackDirectorFactory() {
    return new OrthogonalDirectorFactory();
}
 
开发者ID:RealWei,项目名称:md360,代码行数:5,代码来源:PlaneProjection.java

示例11: hijackDirectorFactory

import com.asha.vrlib.MD360DirectorFactory; //导入依赖的package包/类
protected MD360DirectorFactory hijackDirectorFactory(){ return null; } 
开发者ID:RealWei,项目名称:md360,代码行数:2,代码来源:AbsProjectionStrategy.java


注:本文中的com.asha.vrlib.MD360DirectorFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。