app/src/main/java/fi/finwe/orion360/sdk/pro/examples/appfw/CustomActivity.java
private void configureOrionView() {

        // For compatibility with Google Cardboard 1.0 with magnetic switch, disable magnetometer
        // from sensor fusion. Also recommended for devices with poorly calibrated magnetometer.
        mOrionContext.getSensorFusion().setMagnetometerEnabled(false);

        // 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.PRIVATE_EXPANSION_FILES_PATH + MainMenu.TEST_VIDEO_FILE_MQ);

        // 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();

        // Define maximum limit for zooming. As an example, at value 1.0 (100%) zooming in is
        // disabled. At 3.0 (300%) camera will never reduce the FOV below 1/3 of the base FOV.
        mCamera.setZoomMax(3.0f);

        // Set yaw angle to 0. Now the camera will always point to the same yaw angle
        // (to the horizontal center point of the equirectangular video/image source)
        // when starting the app, regardless of the orientation of the device.
        mCamera.setRotationYaw(0);

        // 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 for playing full spherical monoscopic videos/images.
     */
Configure Orion360 for playing full spherical monoscopic videos/images.
Configure Orion360 for playing full spherical monoscopic videos / images .
private void configureOrionView() {
        mOrionContext.getSensorFusion().setMagnetometerEnabled(false);
        mScene = new OrionScene();
        mScene.bindController(mOrionContext.getSensorFusion());
        mPanorama = new OrionPanorama();
		mPanoramaTexture = OrionTexture.createTextureFromURI(this,
                MainMenu.PRIVATE_EXPANSION_FILES_PATH + MainMenu.TEST_VIDEO_FILE_MQ);
        mPanorama.bindTextureFull(0, mPanoramaTexture);
        mScene.bindSceneItem(mPanorama);
        mCamera = new OrionCamera();
        mCamera.setZoomMax(3.0f);
        mCamera.setRotationYaw(0);
        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);
    }
private void configureOrionView ( ) { mOrionContext . getSensorFusion ( ) . setMagnetometerEnabled ( false ) ; mScene = new OrionScene ( ) ; mScene . bindController ( mOrionContext . getSensorFusion ( ) ) ; mPanorama = new OrionPanorama ( ) ; mPanoramaTexture = OrionTexture . createTextureFromURI ( this , MainMenu . PRIVATE_EXPANSION_FILES_PATH + MainMenu . TEST_VIDEO_FILE_MQ ) ; mPanorama . bindTextureFull ( 0 , mPanoramaTexture ) ; mScene . bindSceneItem ( mPanorama ) ; mCamera = new OrionCamera ( ) ; mCamera . setZoomMax ( 3.0f ) ; mCamera . setRotationYaw ( 0 ) ; 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 for playing full spherical monoscopic videos/images.
Configure Orion360 for playing full spherical monoscopic videos / images .
// For compatibility with Google Cardboard 1.0 with magnetic switch, disable magnetometer // from sensor fusion. Also recommended for devices with poorly calibrated magnetometer. // 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. // Define maximum limit for zooming. As an example, at value 1.0 (100%) zooming in is // disabled. At 3.0 (300%) camera will never reduce the FOV below 1/3 of the base FOV. // Set yaw angle to 0. Now the camera will always point to the same yaw angle // (to the horizontal center point of the equirectangular video/image source) // when starting the app, regardless of the orientation of the device. // 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.