Point Source

class visr::objectmodelPointSource : public visr::objectmodel::Object

Subclassed by visr::objectmodel::PointSourceWithDiffuseness, visr::objectmodel::PointSourceWithReverb

Public Functions

std::unique_ptr<Object> visr::objectmodel::PointSourceclone() const

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

bool visr::objectmodel::PointSourcechannelLock() 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::PointSourcechannelLockDistance() 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.

void visr::objectmodel::PointSourcesetChannelLock(Coordinate newDistance = cAlwaysChannelLock)

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::PointSourceunsetChannelLock()

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

Private Members

Coordinate visr::objectmodel::PointSourcemChannelLockDistance

Representation of the channel lock distance, in degree. A value of zero corresponds to “no channel lock”, while any value >=180 means “always lock”.

Private Static Attributes

const Object::Coordinate visr::objectmodel::PointSourcecAlwaysChannelLock = std::numeric_limits<Object::Coordinate>::infinity()

Special value to denote that the object is in “always lock” mode.

const Object::Coordinate visr::objectmodel::PointSourcecNoChannelLock = 0.0

Special value to denote that the object is in “no channel lock” mode.