Coin  4.0.3
Coin3D core library
Loading...
Searching...
No Matches
SoSoundElement Class Reference

The SoSoundElement is used for optimizing audio rendering and for turning off inactive SoVRMLSound nodes. More...

#include <Inventor/elements/SoSoundElement.h>

Inheritance diagram for SoSoundElement:
SoReplacedElement SoElement

Public Member Functions

virtual void init (SoState *state)
 
virtual void pop (SoState *state, const SoElement *prevTopElement)
 
virtual void print (FILE *file) const
 Prints contents of element (not implemented)
 
virtual void push (SoState *state)
 
- Public Member Functions inherited from SoReplacedElement
virtual SoElementcopyMatchInfo () const
 
SbUniqueId getNodeId () const
 
virtual SbBool matches (const SoElement *element) const
 
- Public Member Functions inherited from SoElement
virtual ~SoElement ()
 
int getDepth (void) const
 
int getStackIndex (void) const
 
const SoType getTypeId (void) const
 
void setDepth (const int depth)
 

Static Public Member Functions

static voidcreateInstance (void)
 
static int getClassStackIndex (void)
 
static SoType getClassTypeId (void)
 
static void initClass (void)
 
static SbBool isPartOfActiveSceneGraph (SoState *const state)
 
static SbBool sceneGraphHasSoundNode (SoState *const state)
 
static void set (SoState *const state, SoNode *const node, SbBool scenegraphhassoundnode, SbBool soundnodeisplaying, SbBool ispartofactivescenegraph)
 
static SbBool setIsPartOfActiveSceneGraph (SoState *const state, SoNode *const node, SbBool flag)
 
static SbBool setSceneGraphHasSoundNode (SoState *const state, SoNode *const node, SbBool flag)
 
static SbBool setSoundNodeIsPlaying (SoState *const state, SoNode *const node, SbBool flag)
 
static SbBool soundNodeIsPlaying (SoState *const state)
 
- Static Public Member Functions inherited from SoReplacedElement
static int getClassStackIndex (void)
 
static SoType getClassTypeId (void)
 
static void initClass (void)
 
- Static Public Member Functions inherited from SoElement
static int getClassStackIndex (void)
 
static SoType getClassTypeId (void)
 
static SoType getIdFromStackIndex (const int stackIndex)
 
static int getNumStackIndices (void)
 
static void initClass (void)
 
static void initElements (void)
 

Protected Member Functions

virtual ~SoSoundElement ()
 
void setDefaultValues ()
 
- Protected Member Functions inherited from SoReplacedElement
virtual ~SoReplacedElement ()
 
- Protected Member Functions inherited from SoElement
 SoElement (void)
 
void capture (SoState *const state) const
 
virtual void captureThis (SoState *state) const
 
SoElementgetNextFree (void) const
 
SoElementgetNextInStack (void) const
 
void setStackIndex (const int index)
 
void setTypeId (const SoType typeId)
 

Protected Attributes

SbBool ispartofactivescenegraph
 
SbBool scenegraphhassoundnode
 
SbBool soundnodeisplaying
 
- Protected Attributes inherited from SoReplacedElement
SbUniqueId nodeId
 
- Protected Attributes inherited from SoElement
int depth
 
int stackIndex
 
SoType typeId
 

Additional Inherited Members

- Static Protected Member Functions inherited from SoReplacedElement
static SoElementgetElement (SoState *const state, const int stackIndex, SoNode *const node)
 
- Static Protected Member Functions inherited from SoElement
static int createStackIndex (const SoType id)
 
static const SoElementgetConstElement (SoState *const state, const int stackIndex)
 
static SoElementgetElement (SoState *const state, const int stackIndex)
 
- Static Protected Attributes inherited from SoElement
static int classStackIndex
 
static SoTypeListstackToType
 

Detailed Description

The SoSoundElement is used for optimizing audio rendering and for turning off inactive SoVRMLSound nodes.

Since
Coin 2.0

Constructor & Destructor Documentation

◆ ~SoSoundElement()

SoSoundElement::~SoSoundElement ( void )
protectedvirtual

Destructor.

Member Function Documentation

◆ createInstance()

void * SoSoundElement::createInstance ( void )
static

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Creates a new instance of the class type corresponding to the SoType object.

◆ getClassStackIndex()

int SoSoundElement::getClassStackIndex ( void )
static

This static method returns the state stack index for the class.

◆ getClassTypeId()

SoType SoSoundElement::getClassTypeId ( void )
static

This static method returns the SoType object associated with objects of this class.

◆ init()

void SoSoundElement::init ( SoState * state)
virtual

Initializes the element to its default value.

Reimplemented from SoReplacedElement.

◆ initClass()

void SoSoundElement::initClass ( void )
static

Initialize relevant common data for all instances, like the type system.

◆ isPartOfActiveSceneGraph()

SbBool SoSoundElement::isPartOfActiveSceneGraph ( SoState *const state)
static

The isPartOfActiveSceneGraph flag is used to make SoVRMLSound that are below inactive parts of the scene graph (i.e. below a SoSwitch or SoLOD node) stop playing.

Returns the value of the isPartOfActiveSceneGraph flag.

◆ pop()

void SoSoundElement::pop ( SoState * state,
const SoElement * prevTopElement )
virtual

Calls the superclass' pop method.

Reimplemented from SoElement.

◆ print()

void SoSoundElement::print ( FILE * file) const
virtual

Prints contents of element (not implemented)

Reimplemented from SoReplacedElement.

◆ push()

void SoSoundElement::push ( SoState * state)
virtual

Calls the superclass' push method. Initializes the element to the default values. Uses previous element's isPartOfActiveSceneGraph flag.

Reimplemented from SoElement.

◆ sceneGraphHasSoundNode()

SbBool SoSoundElement::sceneGraphHasSoundNode ( SoState *const state)
static

The sceneGraphHasSoundNode flag is used to stop the SoAudioRenderAction in SoSeparator and SoVRMLGroup nodes for cases where the subgraph does not contain any SoVRMLSound nodes.

Returns the value of the sceneGraphHasSoundNode flag.

◆ set()

void SoSoundElement::set ( SoState *const state,
SoNode *const node,
SbBool scenegraphhassoundnode,
SbBool soundnodeisplaying,
SbBool ispartofactivescenegraph )
static

Sets the flags.

◆ setDefaultValues()

void SoSoundElement::setDefaultValues ( )
protected

Initializes the element to the default values. The default values for the sceneGraphHasSoundNode is FALSE. The default value for the isPartOfActiveSceneGraph flag is TRUE. the default value for the soundNodeIsPlaying flag is FALSE.

◆ setIsPartOfActiveSceneGraph()

SbBool SoSoundElement::setIsPartOfActiveSceneGraph ( SoState *const state,
SoNode *const node,
SbBool flag )
static

Sets the isPartOfActiveSceneGraph flag.

◆ setSceneGraphHasSoundNode()

SbBool SoSoundElement::setSceneGraphHasSoundNode ( SoState *const state,
SoNode *const node,
SbBool flag )
static

Sets the sceneGraphHasSoundNode flag.

◆ setSoundNodeIsPlaying()

SbBool SoSoundElement::setSoundNodeIsPlaying ( SoState *const state,
SoNode *const node,
SbBool flag )
static

Sets the soundNodeIsPlaying flag.

◆ soundNodeIsPlaying()

SbBool SoSoundElement::soundNodeIsPlaying ( SoState *const state)
static

The soundNodeIsPlaying flag is currently unused.

Returns the value of the soundNodeIsPlaying flag.


The documentation for this class was generated from the following files: