Main Page   Namespace List   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

osgAL::SoundRoot Class Reference

A node that updates the transformation of the listener. Should traversed before any SoundNode nodes. More...

List of all members.

Public Methods

 SoundRoot ()
 Default constructor. More...

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 traverse (osg::NodeVisitor &nv)
void setListenerUpdateFrequency (float f)
void setUpdateEnable (bool flag)
bool getUpdateEnable () const
float getListenerUpdateFrequency () const

Protected Methods

virtual ~SoundRoot ()
 Destructor. More...

 SoundRoot (const SoundRoot &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 Copy constructor. More...

SoundRoot & operator= (const SoundRoot &node)
 Assignment operator. More...


Private Attributes

double m_last_time
double m_first_run
osg::Vec3 m_last_pos
int m_last_traversal_number
double m_update_interval
bool m_update_enabled


Detailed Description

A node that updates the transformation of the listener. Should traversed before any SoundNode nodes.

This class updates the internal state of the osgAL::SoundManager during cull traversal from the current modelView matrix. The cull traversal for this node should be called after any changes are made to the SoundManager (added SoundState events or such).


Constructor & Destructor Documentation

osgAL::SoundRoot::SoundRoot (    ) 
 

Default constructor.

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

Destructor.

osgAL::SoundRoot::SoundRoot (  const SoundRoot &    copy,
const osg::CopyOp &    copyop = osg::CopyOp::SHALLOW_COPY
)  [protected]
 

Copy constructor.


Member Function Documentation

virtual void osgAL::SoundRoot::accept (  osg::NodeVisitor &    nv )  [inline, virtual]
 

virtual const char* osgAL::SoundRoot::className (    )  const [inline, virtual]
 

float osgAL::SoundRoot::getListenerUpdateFrequency (    )  const [inline]
 

Return the frequency by which the orientation and position of the listener is updated

bool osgAL::SoundRoot::getUpdateEnable (    )  const [inline]
 

virtual bool osgAL::SoundRoot::isSameKindAs (  const osg::Object *    obj )  const [inline, virtual]
 

virtual const char* osgAL::SoundRoot::libraryName (    )  const [inline, virtual]
 

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

Assignment operator.

void osgAL::SoundRoot::setListenerUpdateFrequency (  float    f )  [inline]
 

Set the frequency with which the orientation and position of the listener is updated. This is to avoid calling OpenAL++ listener update to often (click under linux)

ams f - Frequency of update.

void osgAL::SoundRoot::setUpdateEnable (  bool    flag )  [inline]
 

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

Executed during traversal of the scenegraph. If the NodeVisitor is a CullVisitor the orientation/position and velocity of the listener is updated.


Member Data Documentation

double osgAL::SoundRoot::m_first_run [private]
 

osg::Vec3 osgAL::SoundRoot::m_last_pos [private]
 

double osgAL::SoundRoot::m_last_time [private]
 

int osgAL::SoundRoot::m_last_traversal_number [private]
 

bool osgAL::SoundRoot::m_update_enabled [private]
 

double osgAL::SoundRoot::m_update_interval [private]
 


The documentation for this class was generated from the following file:
Generated on Tue Feb 8 20:28:07 2005 for OpenSceneGraphAudioLibrary(OsgAL) by doxygen1.2.15