osgAL::SoundNode Class Reference

A placeholder for a soundstate. The transformation is updated automatically during update traversal. More...

List of all members.

Public Member Functions

 SoundNode ()
 Default constructor.
 SoundNode (SoundState *sound_state)
 SoundNode (const SoundNode &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 Copy constructor.
 META_Node (osgAL, SoundNode)
void setSoundState (SoundState *sound_state)
 Associates a soundstate with this SoundNode.
SoundStategetSoundState ()
 Returns a reference to to the Soundstate associated with this SoundNode.
const SoundStategetSoundState () const
 Returns a const 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)
OccludeCallbackgetOccludeCallback ()
const OccludeCallbackgetOccludeCallback () const

Protected Member Functions

virtual ~SoundNode ()
 Destructor.
SoundNodeoperator= (const SoundNode &node)
 Assignment operator.

Protected Attributes

osg::observer_ptr
< SoundState
m_sound_state


Detailed Description

A placeholder for a soundstate. The transformation is updated automatically during update traversal.

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.


Constructor & Destructor Documentation

osgAL::SoundNode::SoundNode (  ) 

Default constructor.

osgAL::SoundNode::SoundNode ( SoundState sound_state  ) 

Constructor that also associates a sound state to this node.

osgAL::SoundNode::SoundNode ( const SoundNode copy,
const osg::CopyOp &  copyop = osg::CopyOp::SHALLOW_COPY 
)

Copy constructor.

virtual osgAL::SoundNode::~SoundNode (  )  [inline, protected, virtual]

Destructor.


Member Function Documentation

osgAL::SoundNode::META_Node ( osgAL  ,
SoundNode   
)

void osgAL::SoundNode::setSoundState ( SoundState sound_state  )  [inline]

Associates a soundstate with this SoundNode.

SoundState* osgAL::SoundNode::getSoundState (  )  [inline]

Returns a reference to to the Soundstate associated with this SoundNode.

const SoundState* osgAL::SoundNode::getSoundState (  )  const [inline]

Returns a const reference to to the Soundstate associated with this SoundNode.

void osgAL::SoundNode::traverse ( osg::NodeVisitor &  nv  ) 

Updates the transformation of the SoundState during Cull traversal.

void osgAL::SoundNode::setOccludeCallback ( OccludeCallback cb  )  [inline]

OccludeCallback* osgAL::SoundNode::getOccludeCallback (  )  [inline]

const OccludeCallback* osgAL::SoundNode::getOccludeCallback (  )  const [inline]

SoundNode& osgAL::SoundNode::operator= ( const SoundNode node  )  [protected]

Assignment operator.


Member Data Documentation

osg::observer_ptr<SoundState> osgAL::SoundNode::m_sound_state [protected]

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


The documentation for this class was generated from the following file:
Generated on Mon Oct 8 10:42:12 2007 for osgAL by  doxygen 1.5.3