open_toontown_panda3d/panda/src/pgraph/audioVolumeAttrib.I

69 lines
2.5 KiB
Plaintext
Executable File

// Filename: audioVolumeAttrib.I
// Created by: darren (15Dec06)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
//
// All use of this software is subject to the terms of the Panda 3d
// Software license. You should have received a copy of this license
// along with this source code; you will also find a current copy of
// the license at http://etc.cmu.edu/panda3d/docs/license/ .
//
// To contact the maintainers of this program write to
// panda3d-general@lists.sourceforge.net .
//
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
// Function: AudioVolumeAttrib::Copy Constructor
// Access: Protected
// Description: Use AudioVolumeAttrib::make() to construct a new
// AudioVolumeAttrib object.
////////////////////////////////////////////////////////////////////
INLINE AudioVolumeAttrib::
AudioVolumeAttrib(const AudioVolumeAttrib &copy) :
_off(copy._off),
_has_volume(copy._has_volume),
_volume(copy._volume)
{
}
////////////////////////////////////////////////////////////////////
// Function: AudioVolumeAttrib::is_off
// Access: Published
// Description: Returns true if the AudioVolumeAttrib will ignore any
// color scales inherited from above, false otherwise.
// This is not the same thing as !has_scale(); a
// AudioVolumeAttrib may have the "off" flag set and also
// have another scale specified.
////////////////////////////////////////////////////////////////////
INLINE bool AudioVolumeAttrib::
is_off() const {
return _off;
}
////////////////////////////////////////////////////////////////////
// Function: AudioVolumeAttrib::has_volume
// Access: Published
// Description: Returns true if the AudioVolumeAttrib has a
// non-identity volume, false otherwise (in which case it
// might be an off attrib or an identity attrib).
////////////////////////////////////////////////////////////////////
INLINE bool AudioVolumeAttrib::
has_volume() const {
return _has_volume;
}
////////////////////////////////////////////////////////////////////
// Function: AudioVolumeAttrib::get_volume
// Access: Published
// Description: Returns the volume to be applied to sounds.
////////////////////////////////////////////////////////////////////
INLINE float AudioVolumeAttrib::
get_volume() const {
return _volume;
}