143 virtual void onAdd(
Node *n );
144 virtual void onRemove(
Node *n );
153 static_cast< Sound *
>( getOwner());
159 Sound( Inst< SFNode > _metadata = 0,
160 Inst< SFVec3f> _direction = 0,
161 Inst< SFFloat> _intensity = 0,
162 Inst< SFVec3f> _location = 0,
163 Inst< SFFloat> _maxBack = 0,
164 Inst< SFFloat> _maxFront = 0,
165 Inst< SFFloat> _minBack = 0,
166 Inst< SFFloat> _minFront = 0,
167 Inst< SFFloat> _priority = 0,
168 Inst< SFSoundSourceNode > _source = 0,
169 Inst< SFBool > _spatialize = 0,
170 Inst< ALSoundSetup > _soundSetup = 0 );
181 virtual void ALrender();
267 H3DUniquePtr< SFSoundSourceNode >
source;
289 static bool alut_initialized;
290 static ALCdevice *al_device;
291 static ALCcontext *al_context;
Header file for X3DSoundNode, X3D scene-graph node.
Header file for X3DSoundSourceNode, X3D scene-graph node.
Node is the base class for all classes that can be part of the H3D scene-graph.
Definition: Node.h:46
The PeriodicUpdate is a template modifier that changes the way the field is updated.
Definition: PeriodicUpdate.h:74
Field that calls ALrender() when a field routed to it has generated an event.
Definition: Sound.h:149
virtual void update()
This function will be called to update the field if it has a pending event when the upToDate() functi...
Definition: Sound.h:151
The SFSoundSourceNode registers the Sound node in the X3DSoundSourceNode that is put into the field.
Definition: Sound.h:138
~SFSoundSourceNode()
Destructor.
Definition: Sound.h:141
The Sound node specifies the spatial presentation of a sound in a X3D scene.
Definition: Sound.h:133
H3DUniquePtr< SFBool > spatialize
The spatialize field specifies if the sound is perceived as being directionally located relative to t...
Definition: Sound.h:282
H3DUniquePtr< SFFloat > minBack
The minBack field specifies the back value of the inner ellipsoid.
Definition: Sound.h:238
H3DUniquePtr< SFFloat > minFront
The minFront field specifies the front value of the inner ellipsoid.
Definition: Sound.h:246
virtual void ALrender()
Perform the OpenAL calls to render the sound node.
Definition: Sound.cpp:157
H3DUniquePtr< SFFloat > priority
The priority field provides a hint for the browser to choose which sounds to play when there are more...
Definition: Sound.h:258
H3DUniquePtr< SFSoundSourceNode > source
The source field specifies the sound source for the Sound node.
Definition: Sound.h:267
H3DUniquePtr< SFMatrix4f > accForwardMatrix
The matrix from local space to global space.
Definition: Sound.h:298
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: Sound.h:285
H3DUniquePtr< SFVec3f > direction
The direction field specifies the direction of the ellipsoids.
Definition: Sound.h:189
H3DUniquePtr< SFVec3f > location
The location field determines the location of the sound emitter in the local coordinate system.
Definition: Sound.h:214
H3DUniquePtr< SFFloat > maxBack
The maxBack field specifies the back value of the outer ellipsoid.
Definition: Sound.h:222
H3DUniquePtr< SFFloat > maxFront
The maxFront field specifies the front value of the outer ellipsoid.
Definition: Sound.h:230
H3DUniquePtr< ALSoundSetup > soundSetup
Field that calls ALrender() when a field routed to it has generated an event.
Definition: Sound.h:295
H3DUniquePtr< SFFloat > intensity
The intensity field adjusts the loudness (decibels) of the sound emitted by the Sound node.
Definition: Sound.h:205
TraverseInfo is a structure that is passed along when traversing the scene graph.
Definition: TraverseInfo.h:57
Template to make sure that the Node that is set in a SFNode is of a specified Node type.
Definition: SFNode.h:97
This abstract node type is the base for all Sound nodes.
Definition: X3DSoundNode.h:48
H3D API namespace.
Definition: Anchor.h:38
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194