VISR  0.12.0
Versatile Interactive Scene Renderer
visr::objectmodel::Object Class Referenceabstract

#include <object.hpp>

Inheritance diagram for visr::objectmodel::Object:
visr::objectmodel::ChannelObject visr::objectmodel::DiffuseSource visr::objectmodel::HoaSource visr::objectmodel::PlaneWave visr::objectmodel::PointSource visr::objectmodel::PointSourceWithDiffuseness visr::objectmodel::PointSourceWithReverb visr::objectmodel::PointSourceExtent

Public Types

using Coordinate = float
 
using Priority = unsigned char
 
using ChannelIndex = unsigned int
 

Public Member Functions

 Object ()=delete
 
 Object (ObjectId id)
 
virtual ~Object ()=0
 
virtual ObjectTypeId type () const =0
 
ObjectId id () const
 
GroupId groupId () const
 
void setGroupId (ObjectId newId)
 
LevelType level () const
 
void setLevel (LevelType newLevel)
 
Priority priority () const
 
void setPriority (Priority newPriority)
 
rbbl::ParametricIirCoefficientList< Coordinate > const & eqCoefficients () const
 
void setEqCoefficients (rbbl::ParametricIirCoefficientList< Coordinate > const &newCoeffs)
 
virtual std::unique_ptr< Objectclone () const =0
 
std::size_t numberOfChannels () const
 
ChannelIndex channelIndex (std::size_t index) const
 
void resetNumberOfChannels (std::size_t numChannels)
 
void setChannelIndex (std::size_t index, ChannelIndex channelIndex)
 

Static Public Attributes

static const ObjectId cInvalidObjectId = UINT_MAX
 
static const GroupId cDefaultGroupId = 0
 
static const ChannelIndex cInvalidChannelIndex = UINT_MAX
 

Member Typedef Documentation

◆ ChannelIndex

Type used for the audio channels associated with an object.

◆ Coordinate

Data types. Data type used by default for all data members such as positions or angles.

◆ Priority

using visr::objectmodel::Object::Priority = unsigned char

Priority. Low values denote high priority (0 is highest priority)

Constructor & Destructor Documentation

◆ Object() [1/2]

visr::objectmodel::Object::Object ( )
delete

◆ Object() [2/2]

visr::objectmodel::Object::Object ( ObjectId  id)
explicit

◆ ~Object()

visr::objectmodel::Object::~Object ( )
pure virtualdefault

Member Function Documentation

◆ channelIndex()

Object::ChannelIndex visr::objectmodel::Object::channelIndex ( std::size_t  index) const

Return the audio channel index for a particular channel.

Parameters
indexthe array index within the array of channel indices.
Exceptions
std::invalid_argumentIf index exceeds the number of available audio channels

◆ clone()

virtual std::unique_ptr<Object> visr::objectmodel::Object::clone ( ) const
pure virtual

◆ eqCoefficients()

rbbl::ParametricIirCoefficientList< Object::Coordinate > const & visr::objectmodel::Object::eqCoefficients ( ) const

◆ groupId()

GroupId visr::objectmodel::Object::groupId ( ) const
inline

◆ id()

ObjectId visr::objectmodel::Object::id ( ) const
inline

◆ level()

LevelType visr::objectmodel::Object::level ( ) const

◆ numberOfChannels()

std::size_t visr::objectmodel::Object::numberOfChannels ( ) const

Support for channels assigned to an audio objects. The base class interface supports arbitrary channel numbers and layouts, but derived classes might offer only restricted channel layouts. Return the number of audio channels of this object.

◆ priority()

Object::Priority visr::objectmodel::Object::priority ( ) const

◆ resetNumberOfChannels()

void visr::objectmodel::Object::resetNumberOfChannels ( std::size_t  numChannels)

Change the number of channels for the audio object. This resets all entries to invalid channel indices (i.e., cInvalidChannelIndex values).

◆ setChannelIndex()

void visr::objectmodel::Object::setChannelIndex ( std::size_t  index,
ChannelIndex  channelIndex 
)

Set the audio channel index for a particular

Exceptions
std::invalid_argumentif index exceeds the number of channels for this object.

◆ setEqCoefficients()

void visr::objectmodel::Object::setEqCoefficients ( rbbl::ParametricIirCoefficientList< Coordinate > const &  newCoeffs)

◆ setGroupId()

void visr::objectmodel::Object::setGroupId ( ObjectId  newId)

◆ setLevel()

void visr::objectmodel::Object::setLevel ( LevelType  newLevel)

◆ setPriority()

void visr::objectmodel::Object::setPriority ( Priority  newPriority)

◆ type()

Member Data Documentation

◆ cDefaultGroupId

const GroupId visr::objectmodel::Object::cDefaultGroupId = 0
static

◆ cInvalidChannelIndex

const Object::ChannelIndex visr::objectmodel::Object::cInvalidChannelIndex = UINT_MAX
static

Special value to denote an invalid or unassigned audio channel index.

Todo:
Decide whether this type must be visible on the outside.

◆ cInvalidObjectId

const ObjectId visr::objectmodel::Object::cInvalidObjectId = UINT_MAX
static
Note
The solution using numeric_limits::max() would be preferable, but cannot be used since MSVC does not support const_expr yet.

Provide definition for the static const class members in order to allow their address to be taken. The value is taken from their declaration within the class.


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