Get the single camera for the scene. If not manually
        set one will abe automatically generated.

        Returns
        ----------
        camera : trimesh.scene.Camera
          Camera object defined for the scene
193459
def camera(self):
        
        # no camera set for the scene yet
        if not hasattr(self, '_camera') or self._camera is None:
            # will create a camera with everything in view
            return self.set_camera()

        return self._camera
267450
def scene=(n)
      if n.nil?
        Kernel.raise IndexError, 'scene number out of bounds' unless @images.length.zero?
        @scene = nil
        return @scene
      elsif @images.length.zero?
        Kernel.raise IndexError, 'scene number out of bounds'
      end

      n = Integer(n)
      Kernel.raise IndexError, 'scene number out of bounds' if n < 0 || n > length - 1
      @scene = n
      @scene
    end
438416
def get_camera_extended_properties(self):
        """"""
        resource = 'cameras/{}'.format(self.device_id)
        resource_event = self.publish_and_get_event(resource)

        if resource_event is None:
            return None

        self._camera_extended_properties = resource_event.get('properties')
        return self._camera_extended_properties
436756
function() {

        var scope = this;

        if( ! scope.shots.length ) {

            throw new Error( "Camera has no last shot" );
            return;

        }

        return scope.getShot( scope.shots.length - 1 );

    }
29619
function TouchCamera(name, position, scene) {
            var _this = _super.call(this, name, position, scene) || this;
            _this.inputs.addTouch();
            _this._setupInputs();
            return _this;
        }
650468
def single_shot(self, check_status=True, **kwargs):
        
        self.check_pid_file()
        self.set_spectator_mode(False)
        if check_status: self.check_status()
        from .launcher import PyLauncher
        return PyLauncher(self, **kwargs).single_shot()
133751
def doorient(self):
        
        assert self.cal1Dfn.is_file(
        ), 'please specify filename for each camera under [cam]/cal1Dname: in .ini file  {}'.format(self.cal1Dfn)

        with h5py.File(self.cal1Dfn, 'r') as f:
            az = f['az'][()]
            el = f['el'][()]
            ra = f['ra'][()]
            dec = f['dec'][()]

        assert az.ndim == el.ndim == 2
        assert az.shape == el.shape

        if self.transpose:
            logging.debug(
                'tranposing cam #{} az/el/ra/dec data. '.format(self.name))
            az = az.T
            el = el.T
            ra = ra.T
            dec = dec.T
        if self.fliplr:
            logging.debug(
                'flipping horizontally cam #{} az/el/ra/dec data.'.format(self.name))
            az = np.fliplr(az)
            el = np.fliplr(el)
            ra = np.fliplr(ra)
            dec = np.fliplr(dec)
        if self.flipud:
            logging.debug(
                'flipping vertically cam #{} az/el/ra/dec data.'.format(self.name))
            az = np.flipud(az)
            el = np.flipud(el)
            ra = np.flipud(ra)
            dec = np.flipud(dec)
        if self.rotccw != 0:
            logging.debug(
                'rotating cam #{} az/el/ra/dec data.'.format(self.name))
            az = np.rot90(az, self.rotccw)
            el = np.rot90(el, self.rotccw)
            ra = np.rot90(ra, self.rotccw)
            dec = np.rot90(dec, self.rotccw)

        self.az = az
        self.el = el
        self.ra = ra
        self.dec = dec
622093
def set_camera(self, camera_id):
        
        self.viewer.cam.fixedcamid = camera_id
        self.viewer.cam.type = const.CAMERA_FIXED
1215020
def get_instance(self, payload):
        
        return RoomRecordingInstance(self._version, payload, room_sid=self._solution['room_sid'], )
282871
def geometry(self):
        

        if self.coord is None:
            return None
        ra = self.coord.ra.degree
        dec = self.coord.dec.degree
        ccds = []

        for geo in self._geometry[self.camera]:
            ycen = geo["dec"] + dec
            xcen = geo["ra"] / math.cos(math.radians(ycen)) + ra
            try:
                dy = geo["ddec"]
                dx = geo["dra"] / math.cos(math.radians(ycen))
                ccds.append([xcen - dx / 2.0, ycen - dy / 2.0, xcen + dx / 2.0, ycen + dy / 2.0])
            except:
                rad = geo["rad"]
                ccds.append([xcen, ycen, rad])
        return ccds
169391
def get_model(self):
        '''
        
        '''
        class Model(object):
            def __init__(self, cnn):
                self.cnn = cnn

        return Model(self.__cnn)
377009
def scene(self, value):
        

        # save the scene reference
        self._scene = value

        # check if we have local not None transform
        # an if we can apply it to the scene graph
        # also check here that scene is a real scene
        if (hasattr(self, '_transform') and
            self._transform is not None and
                hasattr(value, 'graph')):
            # set scene transform to locally saved transform
            self._scene.graph[self.name] = self._transform
            # set local transform to None
            self._transform = None
319579
def get_cameras(self):
        """"""
        response = api.request_homescreen(self)
        try:
            all_cameras = {}
            for camera in response['cameras']:
                camera_network = str(camera['network_id'])
                camera_name = camera['name']
                camera_id = camera['id']
                camera_info = {'name': camera_name, 'id': camera_id}
                if camera_network not in all_cameras:
                    all_cameras[camera_network] = []

                all_cameras[camera_network].append(camera_info)
            return all_cameras
        except KeyError:
            _LOGGER.error("Initialization failue. Could not retrieve cameras.")
            return {}
816257
def currentPixmapRect(self):
        
        pixmap = self.currentPixmap()
        rect   = self.rect()
        size   = pixmap.size()
        
        x = rect.center().x() - (size.width() / 2.0)
        y = rect.center().y() - (size.height() / 2.0)
        
        return QtCore.QRect(x, y, size.width(), size.height())
1216487
def get_cameras_rules(self):
        """"""
        resource = "rules"
        rules_event = self.publish_and_get_event(resource)
        if rules_event:
            return rules_event.get('properties')

        return None
1056638
def color_intrinsics(self):
        
        if self._device is None:
            raise RuntimeError('Kinect2 device %s not runnning. Cannot return color intrinsics')
        camera_params = self._device.getColorCameraParams()
        return CameraIntrinsics(self._color_frame, camera_params.fx, camera_params.fy,
                                camera_params.cx, camera_params.cy)
184435
def get_default_cam_pos(self):
        
        focal_pt = self.center
        return [np.array(rcParams['camera']['position']) + np.array(focal_pt),
                focal_pt, rcParams['camera']['viewup']]