VISR  0.11.1
Versatile Interactive Scene Renderer
visr::objectmodel::PointSource Class Reference

#include <point_source.hpp>

Inheritance diagram for visr::objectmodel::PointSource:
visr::objectmodel::Object visr::objectmodel::PointSourceWithDiffuseness visr::objectmodel::PointSourceWithReverb visr::objectmodel::PointSourceExtent

Public Member Functions

 PointSource ()=delete
 
 PointSource (ObjectId id)
 
virtual ~PointSource ()
 
ObjectTypeId type () const override
 
std::unique_ptr< Objectclone () const override
 
Coordinate x () const
 
Coordinate y () const
 
Coordinate z () const
 
bool channelLock () const
 
Coordinate channelLockDistance () const
 
void setChannelLock (Coordinate newDistance=cAlwaysChannelLock)
 
void unsetChannelLock ()
 
void setX (Coordinate newX)
 
void setY (Coordinate newY)
 
void setZ (Coordinate newZ)
 
- Public Member Functions inherited from visr::objectmodel::Object
 Object ()=delete
 
 Object (ObjectId id)
 
virtual ~Object ()=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)
 
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)
 

Additional Inherited Members

- Public Types inherited from visr::objectmodel::Object
using Coordinate = float
 
using Priority = unsigned char
 
using ChannelIndex = unsigned int
 
- Static Public Attributes inherited from visr::objectmodel::Object
static const ObjectId cInvalidObjectId = UINT_MAX
 
static const GroupId cDefaultGroupId = 0
 
static const ChannelIndex cInvalidChannelIndex = UINT_MAX
 

Constructor & Destructor Documentation

visr::objectmodel::PointSource::PointSource ( )
delete
visr::objectmodel::PointSource::PointSource ( ObjectId  id)
explicit
visr::objectmodel::PointSource::~PointSource ( )
virtualdefault

Member Function Documentation

bool visr::objectmodel::PointSource::channelLock ( ) const

Query whether the "channel lock" feature is active. In this case, the sound source is moved to the nearest loudspeaker if the angular distance to the nearest loudspeaker is less than channelLockDistance().

PointSource::Coordinate visr::objectmodel::PointSource::channelLockDistance ( ) const

Return the currently set channel lock distance (angular distance in degree). If the channel lock feature is inactive, 0 is returned. The "always lock" setting returns +inf.

std::unique_ptr< Object > visr::objectmodel::PointSource::clone ( ) const
overridevirtual

Clone function used to emulate 'virtual copy constructor' functionality. Must be implemented in every derived instantiated class.

Implements visr::objectmodel::Object.

Reimplemented in visr::objectmodel::PointSourceWithReverb, visr::objectmodel::PointSourceExtent, and visr::objectmodel::PointSourceWithDiffuseness.

void visr::objectmodel::PointSource::setChannelLock ( Coordinate  newDistance = cAlwaysChannelLock)
inline

Set the channel lock distance. When called with a nonzero value, channel lock is automatically activated. A value >= 180 (degree) or the default value (+inf) corresponds to "always lock".

void visr::objectmodel::PointSource::setX ( Coordinate  newX)
void visr::objectmodel::PointSource::setY ( Coordinate  newY)
void visr::objectmodel::PointSource::setZ ( Coordinate  newZ)
void visr::objectmodel::PointSource::unsetChannelLock ( )
inline

Deactivate the channel lock feature. This sets the lock distance to zero.

Coordinate visr::objectmodel::PointSource::x ( ) const
inline
Coordinate visr::objectmodel::PointSource::y ( ) const
inline
Coordinate visr::objectmodel::PointSource::z ( ) const
inline

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