app/src/main/java/fi/finwe/orion360/sdk/pro/examples/widget/VideoControls.java
protected void initOrion() {

        // Create a new scene. This represents a 3D world where various objects can be placed.
        mScene = new OrionScene();

        // Bind sensor fusion as a controller. This will make it available for scene objects.
        mScene.bindController(mOrionContext.getSensorFusion());

        // Create a new panorama. This is a 3D object that will represent a spherical video/image.
        mPanorama = new OrionPanorama();

        // Create a new video (or image) texture from a video (or image) source URI.
        mPanoramaTexture = OrionTexture.createTextureFromURI(this,
                MainMenu.TEST_VIDEO_URI_1280x640);

        // Bind the panorama texture to the panorama object. Here we assume full spherical
        // equirectangular monoscopic source, and wrap the complete texture around the sphere.
        // If you have stereoscopic content or doughnut shape video, use other method variants.
        mPanorama.bindTextureFull(0, mPanoramaTexture);

        // Bind the panorama to the scene. This will make it part of our 3D world.
        mScene.bindSceneItem(mPanorama);

        // Create a new camera. This will become the end-user's eyes into the 3D world.
        mCamera = new OrionCamera();

        // Bind camera as a controllable to sensor fusion. This will let sensors rotate the camera.
        mOrionContext.getSensorFusion().bindControllable(mCamera);

        // Create a new touch controller widget (convenience class), and let it control our camera.
        mTouchController = new TouchControllerWidget(mCamera);

        // Bind the touch controller widget to the scene. This will make it functional in the scene.
        mScene.bindWidget(mTouchController);

        // Find Orion360 view from the XML layout. This is an Android view where we render content.
        mView = (OrionView)findViewById(R.id.orion_view);

        // Bind the scene to the view. This is the 3D world that we will be rendering to this view.
        mView.bindDefaultScene(mScene);

        // Bind the camera to the view. We will look into the 3D world through this camera.
        mView.bindDefaultCamera(mCamera);

        // The view can be divided into one or more viewports. For example, in VR mode we have one
        // viewport per eye. Here we fill the complete view with one (landscape) viewport.
        mView.bindViewports(OrionViewport.VIEWPORT_CONFIG_FULL,
                OrionViewport.CoordinateType.FIXED_LANDSCAPE);
    }
/**
     * Configure Orion360 as a typical mono panorama video player.
     */
Configure Orion360 as a typical mono panorama video player.
Configure Orion360 as a typical mono panorama video player .
protected void initOrion() {
        mScene = new OrionScene();
        mScene.bindController(mOrionContext.getSensorFusion());
        mPanorama = new OrionPanorama();
        mPanoramaTexture = OrionTexture.createTextureFromURI(this,
                MainMenu.TEST_VIDEO_URI_1280x640);
        mPanorama.bindTextureFull(0, mPanoramaTexture);
        mScene.bindSceneItem(mPanorama);
        mCamera = new OrionCamera();
        mOrionContext.getSensorFusion().bindControllable(mCamera);
        mTouchController = new TouchControllerWidget(mCamera);
        mScene.bindWidget(mTouchController);
        mView = (OrionView)findViewById(R.id.orion_view);
        mView.bindDefaultScene(mScene);
        mView.bindDefaultCamera(mCamera);
        mView.bindViewports(OrionViewport.VIEWPORT_CONFIG_FULL,
                OrionViewport.CoordinateType.FIXED_LANDSCAPE);
    }
protected void initOrion ( ) { mScene = new OrionScene ( ) ; mScene . bindController ( mOrionContext . getSensorFusion ( ) ) ; mPanorama = new OrionPanorama ( ) ; mPanoramaTexture = OrionTexture . createTextureFromURI ( this , MainMenu . TEST_VIDEO_URI_1280x640 ) ; mPanorama . bindTextureFull ( 0 , mPanoramaTexture ) ; mScene . bindSceneItem ( mPanorama ) ; mCamera = new OrionCamera ( ) ; mOrionContext . getSensorFusion ( ) . bindControllable ( mCamera ) ; mTouchController = new TouchControllerWidget ( mCamera ) ; mScene . bindWidget ( mTouchController ) ; mView = ( OrionView ) findViewById ( R . id . orion_view ) ; mView . bindDefaultScene ( mScene ) ; mView . bindDefaultCamera ( mCamera ) ; mView . bindViewports ( OrionViewport . VIEWPORT_CONFIG_FULL , OrionViewport . CoordinateType . FIXED_LANDSCAPE ) ; }
Configure Orion360 as a typical mono panorama video player.
Configure Orion360 as a typical mono panorama video player .
// Create a new scene. This represents a 3D world where various objects can be placed. // Bind sensor fusion as a controller. This will make it available for scene objects. // Create a new panorama. This is a 3D object that will represent a spherical video/image. // Create a new video (or image) texture from a video (or image) source URI. // Bind the panorama texture to the panorama object. Here we assume full spherical // equirectangular monoscopic source, and wrap the complete texture around the sphere. // If you have stereoscopic content or doughnut shape video, use other method variants. // Bind the panorama to the scene. This will make it part of our 3D world. // Create a new camera. This will become the end-user's eyes into the 3D world. // Bind camera as a controllable to sensor fusion. This will let sensors rotate the camera. // Create a new touch controller widget (convenience class), and let it control our camera. // Bind the touch controller widget to the scene. This will make it functional in the scene. // Find Orion360 view from the XML layout. This is an Android view where we render content. // Bind the scene to the view. This is the 3D world that we will be rendering to this view. // Bind the camera to the view. We will look into the 3D world through this camera. // The view can be divided into one or more viewports. For example, in VR mode we have one // viewport per eye. Here we fill the complete view with one (landscape) viewport.