| http://www.sim.no/ http://www.coin3d.org/

Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SoSoundElement Class Reference
Element Classes

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:

## Public Member Functions

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

## Static Public Member Functions

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

## 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
void | setTypeId (const SoType typeId)
void | setStackIndex (const int index)
SoElement * | getNextInStack (void) const
SoElement * | getNextFree (void) const

## Protected Attributes

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

## Additional Inherited Members

Static Protected Member Functions inherited from SoReplacedElement
static SoElement * | getElement (SoState *const state, const int stackIndex, SoNode *const node)
Static Protected Member Functions inherited from SoElement
static SoElement * | getElement (SoState *const state, const int stackIndex)
static const SoElement * | getConstElement (SoState *const state, const int stackIndex)
static int | createStackIndex (const SoType id)
Static Protected Attributes inherited from SoElement
static int | classStackIndex
static SoTypeList * | stackToType

## 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

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

## ◆ initClass()

void SoSoundElement::initClass | ( | void |  | ) |

static

This static method initializes static data for the SoSoundElement class.

## ◆ init()

void SoSoundElement::init | ( | SoState * | state | ) |

virtual

Initializes the element to it's default value.

Reimplemented from SoReplacedElement.

## ◆ set()

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

static

Sets the flags.

## ◆ setSceneGraphHasSoundNode()

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

static

Sets the sceneGraphHasSoundNode flag.

## ◆ 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 sub-graph doesn not contain any SoVRMLSound nodes.

Returns the value of 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.

## ◆ setIsPartOfActiveSceneGraph()

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

static

Sets the isPartOfActiveSceneGraph flag.

## ◆ isPartOfActiveSceneGraph()

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

static

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

Returns the value of the isPartOfActiveSceneGraph flag.

## ◆ 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.

## ◆ pop()

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

virtual

Calls the superclass' pop method.

Reimplemented from SoElement.

## ◆ 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.

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

- SoSoundElement.h
- SoSoundElement.cpp

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.