Panda3D
Functions
audioVolumeAttrib.cxx File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

#include "audioVolumeAttrib.h"
#include "graphicsStateGuardianBase.h"
#include "dcast.h"
#include "bamReader.h"
#include "bamWriter.h"
#include "datagram.h"
#include "datagramIterator.h"
#include "config_pgraph.h"

Go to the source code of this file.

Functions

 CPT (RenderAttrib) AudioVolumeAttrib
 Constructs an identity audio volume attrib. More...
 

Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
darren
Date
2006-12-15

Definition in file audioVolumeAttrib.cxx.

Function Documentation

◆ CPT()

CPT ( RenderAttrib  )

Constructs an identity audio volume attrib.

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

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

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

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

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

Intended to be overridden by derived AudioVolumeAttrib types to return a unique number indicating whether this AudioVolumeAttrib is equivalent to the other one.

This should return 0 if the two AudioVolumeAttrib objects are equivalent, a number less than zero if this one should be sorted before the other one, and a number greater than zero otherwise.

This will only be called with two AudioVolumeAttrib objects whose get_type() functions return the same. Intended to be overridden by derived RenderAttrib types to return a unique hash for these particular properties. RenderAttribs that compare the same with compare_to_impl(), above, should return the same hash; RenderAttribs that compare differently should return a different hash. Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.

This should return the result of applying the other RenderAttrib to a node in the scene graph below this RenderAttrib, which was already applied. In most cases, the result is the same as the other RenderAttrib (that is, a subsequent RenderAttrib completely replaces the preceding one). On the other hand, some kinds of RenderAttrib (for instance, ColorTransformAttrib) might combine in meaningful ways. Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.

See invert_compose() and compose_impl(). Tells the BamReader how to create objects of type AudioVolumeAttrib.

Definition at line 42 of file audioVolumeAttrib.cxx.