Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# AudioVolumeAttrib Class Reference

Applies a scale to audio volume for positional sounds in the scene graph. More...

Inheritance diagram for AudioVolumeAttrib:

List of all members.

## Public Member Functions
float | getVolume ()
| Returns the volume to be applied to sounds.
bool | hasVolume ()
| 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).
bool | isOff ()
| Returns true if the AudioVolumeAttrib will ignore any color scales inherited from above, false otherwise.
RenderAttrib const | setVolume (float volume)
| Returns a new AudioVolumeAttrib, just like this one, but with the volume changed to the indicated value.
## Static Public Member Functions
static int | getClassSlot ()
static TypeHandle | getClassType ()
static RenderAttrib const | make (float volume)
| Constructs a new AudioVolumeAttrib object that indicates audio volume should be scaled by the indicated factor.
static RenderAttrib const | makeDefault ()
| Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.
static RenderAttrib const | makeIdentity ()
| Constructs an identity audio volume attrib.
static RenderAttrib const | makeOff ()
| Constructs a new AudioVolumeAttrib object that ignores any AudioVolumeAttrib inherited from above.

## Detailed Description

Applies a scale to audio volume for positional sounds in the scene graph.

## Member Function Documentation

static int getClassSlot | ( |  | ) | `[static]`

static TypeHandle getClassType | ( |  | ) | `[static]`

Reimplemented from RenderAttrib.

float getVolume | ( |  | ) |

Returns the volume to be applied to sounds.

bool hasVolume | ( |  | ) |

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).

bool isOff | ( |  | ) |

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.

static RenderAttrib const make | ( | float | volume | ) | `[static]`

Constructs a new AudioVolumeAttrib object that indicates audio volume should be scaled by the indicated factor.

static RenderAttrib const makeDefault | ( |  | ) | `[static]`

Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.

static RenderAttrib const makeIdentity | ( |  | ) | `[static]`

Constructs an identity audio volume attrib.

static RenderAttrib const makeOff | ( |  | ) | `[static]`

Constructs a new AudioVolumeAttrib object that ignores any AudioVolumeAttrib inherited from above.

You may also specify an additional volume scale to apply to geometry below (using set_volume()).

RenderAttrib const setVolume | ( | float | volume | ) |

Returns a new AudioVolumeAttrib, just like this one, but with the volume changed to the indicated value.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties