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

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

        // Create a new sprite. This is a 3D object with a flat 2D surface for an image/video.
        mCameraSprite = new OrionSprite();

        // We don't need perspective camera for viewing camera sprite.
        mCameraSprite.setRenderingMode(OrionSceneItem.RenderingMode.CAMERA_DISABLED);

        // Create a new texture where frames will be captured from device's hardware camera.
        mCameraTexture = new OrionCameraTexture(OrionCameraTexture.CameraFacing.BACK);

        // Bind the camera texture to the camera sprite.
        mCameraSprite.bindTexture(mCameraTexture);

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

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

        // 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);
    }
/**
     * Initialize Orion360 as a hardware camera preview.
     */
Initialize Orion360 as a hardware camera preview.
Initialize Orion360 as a hardware camera preview .
protected void initOrion() {
        mScene = new OrionScene();
        mCameraSprite = new OrionSprite();
        mCameraSprite.setRenderingMode(OrionSceneItem.RenderingMode.CAMERA_DISABLED);
        mCameraTexture = new OrionCameraTexture(OrionCameraTexture.CameraFacing.BACK);
        mCameraSprite.bindTexture(mCameraTexture);
        mScene.bindSceneItem(mCameraSprite);
        mCamera = new OrionCamera();
        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 ( ) ; mCameraSprite = new OrionSprite ( ) ; mCameraSprite . setRenderingMode ( OrionSceneItem . RenderingMode . CAMERA_DISABLED ) ; mCameraTexture = new OrionCameraTexture ( OrionCameraTexture . CameraFacing . BACK ) ; mCameraSprite . bindTexture ( mCameraTexture ) ; mScene . bindSceneItem ( mCameraSprite ) ; mCamera = new OrionCamera ( ) ; mView = ( OrionView ) findViewById ( R . id . orion_view ) ; mView . bindDefaultScene ( mScene ) ; mView . bindDefaultCamera ( mCamera ) ; mView . bindViewports ( OrionViewport . VIEWPORT_CONFIG_FULL , OrionViewport . CoordinateType . FIXED_LANDSCAPE ) ; }
Initialize Orion360 as a hardware camera preview.
Initialize Orion360 as a hardware camera preview .
// Create a new scene. This represents a 3D world where various objects can be placed. // Create a new sprite. This is a 3D object with a flat 2D surface for an image/video. // We don't need perspective camera for viewing camera sprite. // Create a new texture where frames will be captured from device's hardware camera. // Bind the camera texture to the camera sprite. // Bind the sprite 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. // 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.