Get/set the volume occupied by actor.
965318
def volume(self, value=None):
        """"""
        mass = vtk.vtkMassProperties()
        mass.SetGlobalWarningDisplay(0)
        mass.SetInputData(self.polydata())
        mass.Update()
        v = mass.GetVolume()
        if value is not None:
            if not v:
                colors.printc("~bomb Volume is zero: cannot rescale.", c=1, end="")
                colors.printc(" Consider adding actor.triangle()", c=1)
                return self
            self.scale(value / v)
            return self
        else:
            return v
397373
def get_volume_by_wwn(wwn)
      begin
        @volume.get_volume_by_wwn(wwn)
      rescue => ex
        Util.log_exception(ex, caller_locations(1, 1)[0].label)
        raise ex
      end
    end
1249984
async def SetVolumeInfo(self, volumes):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='StorageProvisioner',
                   request='SetVolumeInfo',
                   version=4,
                   params=_params)
        _params['volumes'] = volumes
        reply = await self.rpc(msg)
        return reply
180194
def volume_down(self, delta=0.1):
        
        if delta <= 0:
            raise ValueError(
                "volume delta must be greater than zero, not {}".format(delta))
        return self.set_volume(self.status.volume_level - delta)
1179680
def signedDistance(actor, maxradius=0.5, bounds=(0, 1, 0, 1, 0, 1), dims=(10, 10, 10)):
    
    dist = vtk.vtkSignedDistance()
    dist.SetInputData(actor.polydata(True))
    dist.SetRadius(maxradius)
    dist.SetBounds(bounds)
    dist.SetDimensions(dims)
    dist.Update()
    return Volume(dist.GetOutput())
197764
def set_setting(self, setting, value, area='1', validate_value=True):
        """"""
        setting = setting.lower()

        if setting not in CONST.ALL_SETTINGS:
            raise AbodeException(ERROR.INVALID_SETTING, CONST.ALL_SETTINGS)

        if setting in CONST.PANEL_SETTINGS:
            url = CONST.SETTINGS_URL
            data = self._panel_settings(setting, value, validate_value)
        elif setting in CONST.AREA_SETTINGS:
            url = CONST.AREAS_URL
            data = self._area_settings(area, setting, value, validate_value)
        elif setting in CONST.SOUND_SETTINGS:
            url = CONST.SOUNDS_URL
            data = self._sound_settings(area, setting, value, validate_value)
        elif setting in CONST.SIREN_SETTINGS:
            url = CONST.SIREN_URL
            data = self._siren_settings(setting, value, validate_value)

        return self.send_request(method="put", url=url, data=data)
1023693
def getAmbientThreshold(self):
    """"""
    command = '$GO'
    threshold = self.sendCommand(command)
    if threshold[0] == 'NK':
      return 0
    else:
      return float(threshold[1])/10
779708
def volume(self):
        
        return abs(np.linalg.det(self._aug)) / math.factorial(self.simplex_dim)
1132339
def set_s_vol(self, vol=None, relative=False):
        '''
        
        '''
        if vol != None:
            if relative:
                vol += self.s_vol
            self.s_vol = min(max(vol, 0), 1)
        for sgroup in self.sounds.values():
            for snd in sgroup.values():
                snd.set_volume()
335069
def set_volume(self, mute=False, volume=50):
        """"""
        self.publish(
            action='set',
            resource='cameras/{}'.format(self.device_id),
            publish_response=False,
            properties={'speaker': {'mute': mute, 'volume': volume}}
        )
433987
def read(self, size):
        """"""
        buf, overflow = self._audio_stream.read(size)
        if overflow:
            logging.warning('SoundDeviceStream read overflow (%d, %d)',
                            size, len(buf))
        return bytes(buf)
874610
public void setCurrentMusicVolume(float volume) {
		if (volume < 0) {
			volume = 0;
		}
		if (volume > 1) {
			volume = 1;
		}
		
		if (soundWorks) {
			lastCurrentMusicVolume = volume;
			AL10.alSourcef(sources.get(0), AL10.AL_GAIN, lastCurrentMusicVolume * musicVolume); 
		}
	}
493076
async def get_volume_information(self) -> List[Volume]:
        """"""
        res = await self.services["audio"]["getVolumeInformation"]({})
        volume_info = [Volume.make(services=self.services, **x) for x in res]
        if len(volume_info) < 1:
            logging.warning("Unable to get volume information")
        elif len(volume_info) > 1:
            logging.debug("The device seems to have more than one volume setting.")
        return volume_info
987764
def _on_client_volume_changed(self, data):
        """"""
        self._clients.get(data.get('id')).update_volume(data)
1213003
def volume(self):
        
        volume = abs(self.primitive.polygon.area *
                     self.primitive.height)
        return volume
1322642
def _restore_volume(self, fade):
        
        self.device.mute = self.mute

        # Can only change volume on device with fixed volume set to False
        # otherwise get uPnP error, so check first. Before issuing a network
        # command to check, fixed volume always has volume set to 100.
        # So only checked fixed volume if volume is 100.
        if self.volume == 100:
            fixed_vol = self.device.renderingControl.GetOutputFixed(
                [('InstanceID', 0)])['CurrentFixed']
        else:
            fixed_vol = False

        # now set volume if not fixed
        if not fixed_vol:
            self.device.bass = self.bass
            self.device.treble = self.treble
            self.device.loudness = self.loudness

            if fade:
                # if fade requested in restore
                # set volume to 0 then fade up to saved volume (non blocking)
                self.device.volume = 0
                self.device.ramp_to_volume(self.volume)
            else:
                # set volume
                self.device.volume = self.volume
1108196
def get_volume(self):
        
        log.debug("getting volumne...")
        cmd, url = DEVICE_URLS["get_volume"]
        return self._exec(cmd, url)