Set the {@link GVRCameraRig camera rig} used for rendering the scene on
the screen.

@param cameraRig
The {@link GVRCameraRig camera rig} to render with.
770882
public synchronized void setMainCameraRig(GVRCameraRig cameraRig) {
        mMainCameraRig = cameraRig;
        NativeScene.setMainCameraRig(getNative(), cameraRig.getNative());

        final GVRContext gvrContext = getGVRContext();
        if (this == gvrContext.getMainScene()) {
            gvrContext.getApplication().setCameraRig(getMainCameraRig());
        }
    }
39392
public void setPixelPerInch(int pixelPerInch)
	{
		if (1 > pixelPerInch)
		{
			String _message = "The specified pixelPerInch ({0}) is incorrect, it must be greater or equal than 1.";
			Object[] _parameters =
			{
				new Integer(pixelPerInch)
			};
			throw new IllegalArgumentException(MessageFormat.format(_message, _parameters));
		}
		myPixelPerInch = pixelPerInch;
	}
855852
public void addChildObjectToCamera(final GVRSceneObject child, int camera) {
        switch (camera) {
            case LEFT_CAMERA:
                mLeftCameraRootObject.addChildObject(child);
                break;
            case RIGHT_CAMERA:
                mRightCameraRootObject.addChildObject(child);
                break;
            default:
                mMainCameraRootObject.addChildObject(child);
                break;
        }
    }
1290761
public void setModel( BundleAdjustmentCamera model ) {
		this.model = model;
		numIntrinsic = model.getIntrinsicCount();
		if( numIntrinsic > intrinsic.length ) {
			intrinsic = new double[numIntrinsic];
		}
		model.getIntrinsic(intrinsic,0);

		numericalPoint = createNumericalAlgorithm(funcPoint);
		numericalIntrinsic = createNumericalAlgorithm(funcIntrinsic);
	}
42066
function () {
    var data = this.data;
    var sceneEl = this.el;
    var spectatorCameraEl;
    var spectatorCameraRigEl;

    // Developer-defined spectator rig.
    if (this.el.querySelector('#spectatorCameraRig')) {
      this.spectatorCameraEl = sceneEl.querySelector('#spectatorCameraRig');
      return;
    }

    // Create spectator camera rig.
    spectatorCameraRigEl = sceneEl.querySelector('#spectatorCameraRig') ||
                           document.createElement('a-entity');
    spectatorCameraRigEl.id = 'spectatorCameraRig';
    spectatorCameraRigEl.setAttribute('position', data.spectatorPosition);
    this.spectatorCameraRigEl = spectatorCameraRigEl;

    // Create spectator camera.
    spectatorCameraEl = sceneEl.querySelector('#spectatorCamera') ||
                        document.createElement('a-entity');
    spectatorCameraEl.id = 'spectatorCamera';
    spectatorCameraEl.setAttribute('camera', {active: data.spectatorMode, userHeight: 0});
    spectatorCameraEl.setAttribute('look-controls', '');
    spectatorCameraEl.setAttribute('wasd-controls', {fly: true});
    this.spectatorCameraEl = spectatorCameraEl;

    // Append rig.
    spectatorCameraRigEl.appendChild(spectatorCameraEl);
    sceneEl.appendChild(spectatorCameraRigEl);
    sceneEl.emit('spectatorcameracreated');
  }
1052333
public void configure(LensDistortionNarrowFOV distortion , Se3_F64 worldToCamera ) {
		this.worldToCamera = worldToCamera;

		normToPixel = distortion.distort_F64(false,true);
	}
1019158
public void setOwnerObject(GVRSceneObject owner) {
        if (owner != null)
        {
            if (getNative() != 0)
            {
                NativeComponent.setOwnerObject(getNative(), owner.getNative());
            }
            this.owner = owner;
            onAttach(owner);
        }
        else
        {
            if (null != this.owner) {
                onDetach(this.owner);
                if (getNative() != 0) {
                    NativeComponent.setOwnerObject(getNative(), 0L);
                }
                this.owner = null;
            }
        }
    }
602759
public void setImage(final GVRImage imageData)
    {
        mImage = imageData;
        if (imageData != null)
            NativeTexture.setImage(getNative(), imageData, imageData.getNative());
        else
            NativeTexture.setImage(getNative(), null, 0);
    }
393821
protected void setStageViewport() {
        if (context.isAvailable(Viewport.class)) {
            stage.setViewport(context.get(Viewport.class, stage));
        } else {
            Gdx.app.debug(Lml.LOGGER_TAG, "No provider found for Viewport.class. Using default Stage viewport.");
        }
        final Viewport viewport = stage.getViewport();
        centerCamera = viewport instanceof ScreenViewport || viewport instanceof LetterboxingViewport;
    }
859094
function () {
    var data = this.data;
    var sceneEl = this.el;

    if (data.cameraOverride) {
      // Specify which camera is the original camera (e.g., used by Inspector).
      this.cameraEl = data.cameraOverride;
    } else {
      // Default camera.
      this.cameraEl = sceneEl.camera.el;
      // Make sure A-Frame doesn't automatically remove this camera.
      this.cameraEl.removeAttribute('data-aframe-default-camera');
    }
    this.cameraEl.setAttribute('data-aframe-avatar-replayer-camera', '');

    sceneEl.removeEventListener('camera-set-active', this.setupCamera);

    this.configureHeadGeometry();

    // Create spectator camera for either if we are in spectator mode or toggling to it.
    this.initSpectatorCamera();
  }
976538
public void setMaterial(GVRMaterial material)
    {
        mMaterial = material;
        NativeRenderPass.setMaterial(getNative(), material.getNative());
    }
1181611
public void setTexture(String key, GVRTexture texture)
    {
        checkStringNotNullOrEmpty("key", key);
        synchronized (textures)
        {
            textures.put(key, texture);
            NativeShaderData.setTexture(getNative(), key, texture != null ? texture.getNative() : 0);
        }
    }
1340130
void initFromCameraParameters(OpenCamera camera) {
    Camera.Parameters parameters = camera.getCamera().getParameters();
    WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
    Display display = manager.getDefaultDisplay();

    int displayRotation = display.getRotation();
    int cwRotationFromNaturalToDisplay;
    switch (displayRotation) {
      case Surface.ROTATION_0:
        cwRotationFromNaturalToDisplay = 0;
        break;
      case Surface.ROTATION_90:
        cwRotationFromNaturalToDisplay = 90;
        break;
      case Surface.ROTATION_180:
        cwRotationFromNaturalToDisplay = 180;
        break;
      case Surface.ROTATION_270:
        cwRotationFromNaturalToDisplay = 270;
        break;
      default:
        // Have seen this return incorrect values like -90
        if (displayRotation % 90 == 0) {
          cwRotationFromNaturalToDisplay = (360 + displayRotation) % 360;
        } else {
          throw new IllegalArgumentException("Bad rotation: " + displayRotation);
        }
    }
    Log.i(TAG, "Display at: " + cwRotationFromNaturalToDisplay);

    int cwRotationFromNaturalToCamera = camera.getOrientation();
    Log.i(TAG, "Camera at: " + cwRotationFromNaturalToCamera);

    // Still not 100% sure about this. But acts like we need to flip this:
    if (camera.getFacing() == CameraFacing.FRONT) {
      cwRotationFromNaturalToCamera = (360 - cwRotationFromNaturalToCamera) % 360;
      Log.i(TAG, "Front camera overriden to: " + cwRotationFromNaturalToCamera);
    }

    /*
    SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
    String overrideRotationString;
    if (camera.getFacing() == CameraFacing.FRONT) {
      overrideRotationString = prefs.getString(PreferencesActivity.KEY_FORCE_CAMERA_ORIENTATION_FRONT, null);
    } else {
      overrideRotationString = prefs.getString(PreferencesActivity.KEY_FORCE_CAMERA_ORIENTATION, null);
    }
    if (overrideRotationString != null && !"-".equals(overrideRotationString)) {
      Log.i(TAG, "Overriding camera manually to " + overrideRotationString);
      cwRotationFromNaturalToCamera = Integer.parseInt(overrideRotationString);
    }
     */

    cwRotationFromDisplayToCamera =
        (360 + cwRotationFromNaturalToCamera - cwRotationFromNaturalToDisplay) % 360;
    Log.i(TAG, "Final display orientation: " + cwRotationFromDisplayToCamera);
    if (camera.getFacing() == CameraFacing.FRONT) {
      Log.i(TAG, "Compensating rotation for front camera");
      cwNeededRotation = (360 - cwRotationFromDisplayToCamera) % 360;
    } else {
      cwNeededRotation = cwRotationFromDisplayToCamera;
    }
    Log.i(TAG, "Clockwise rotation from display to camera: " + cwNeededRotation);

    Point theScreenResolution = new Point();
    display.getSize(theScreenResolution);
    screenResolution = theScreenResolution;
    Log.i(TAG, "Screen resolution in current orientation: " + screenResolution);
    cameraResolution = CameraConfigurationUtils.findBestPreviewSizeValue(parameters, screenResolution);
    Log.i(TAG, "Camera resolution: " + cameraResolution);
    bestPreviewSize = CameraConfigurationUtils.findBestPreviewSizeValue(parameters, screenResolution);
    Log.i(TAG, "Best available preview size: " + bestPreviewSize);

    boolean isScreenPortrait = screenResolution.x < screenResolution.y;
    boolean isPreviewSizePortrait = bestPreviewSize.x < bestPreviewSize.y;

    if (isScreenPortrait == isPreviewSizePortrait) {
      previewSizeOnScreen = bestPreviewSize;
    } else {
      previewSizeOnScreen = new Point(bestPreviewSize.y, bestPreviewSize.x);
    }
    Log.i(TAG, "Preview size on screen: " + previewSizeOnScreen);
  }
270136
public static void setDriver(WebcamDriver wd) {

		if (wd == null) {
			throw new IllegalArgumentException("Webcam driver cannot be null!");
		}

		LOG.debug("Setting new capture driver {}", wd);

		resetDriver();

		driver = wd;
	}
787284
public void setPerspective() {
		double cameraZ = ((height / 2.0) / Math.tan(Math.PI * 60.0 / 360.0));
		matrixMode(MatrixMode.PROJECTION);
		resetMatrix();
		glu.gluPerspective(Math.PI / 3.0, this.width
				/ this.height, cameraZ / 10.0, cameraZ * 10.0);
		matrixMode(MatrixMode.MODELVIEW);
		resetMatrix();
	}
39415
public void setTexture(final int bitmapId) {
        if (bitmapId < 0)
            return;

        final GVRAndroidResource resource = new GVRAndroidResource(
                mContext.getContext(), bitmapId);
        setTexture(mContext.getAssetLoader().loadTexture(resource));
    }
216027
public void requestCamera(int camera) {
        if (Camera.getNumberOfCameras() == 1) {
            Log.w(TAG, "Ignoring requestCamera: only one device camera available.");
            return;
        }
        mDesiredCamera = camera;
        if (mCamera != null && mDesiredCamera != mCurrentCamera) {
            // Hot swap camera
            mHandler.sendMessage(mHandler.obtainMessage(MSG_RELEASE_CAMERA));
            mHandler.sendMessage(mHandler.obtainMessage(MSG_REOPEN_CAMERA));
        }
    }