Public Member Functions | |
SoundNode () | |
Default constructor. | |
SoundNode (SoundState *sound_state) | |
SoundNode (const SoundNode ©, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
Copy constructor. | |
virtual const char * | libraryName () const |
virtual const char * | className () const |
virtual bool | isSameKindAs (const osg::Object *obj) const |
virtual void | accept (osg::NodeVisitor &nv) |
void | setSoundState (SoundState *sound_state) |
Associates a soundstate with this SoundNode. | |
SoundState * | getSoundState () |
Returns a reference to to the Soundstate associated with this SoundNode. | |
void | traverse (osg::NodeVisitor &nv) |
Updates the transformation of the SoundState during Cull traversal. | |
void | setOccludeCallback (OccludeCallback *cb) |
OccludeCallback * | getOccludeCallback () |
Protected Member Functions | |
virtual | ~SoundNode () |
Destructor. | |
SoundNode & | operator= (const SoundNode &node) |
Assignment operator. | |
Protected Attributes | |
SoundState * | m_sound_state |
This class implements a scenegraph node has a SoundState associated to it. During cull traversal the orientation and position in world coordinates is calculated for this node and fed to the SoundSystem. This ensures that the node follows any transformation above this node.
|
Default constructor.
|
|
Constructor that also associates a sound state to this node. |
|
Copy constructor.
|
|
Destructor.
|
|
|
|
|
|
|
|
Returns a reference to to the Soundstate associated with this SoundNode.
|
|
|
|
|
|
Assignment operator.
|
|
|
|
Associates a soundstate with this SoundNode.
|
|
Updates the transformation of the SoundState during Cull traversal.
|
|
: The SoundState should be referenced with a ref_ptr, This currently causes problem, as the soundstate, and therefore any referenced soundsources are held, until this node is deleted. Which can be by OpenSceneGraph model cache. The time of this event can be late, outside the scope of main. This causes problems with OpenAL, which for some reason reports an invalid context during the deletion of that source. Therefore, just an ordinary pointer. Memory is properly deallocated by the SoundManager, so its not really a problem. |