cgv
Loading...
Searching...
No Matches
cgv::audio::OALListener Class Referencefinal

This class models the single OpenAL listener. More...

#include <al_context.h>

Public Member Functions

 OALListener (const OALListener &other)=delete
 
 OALListener (OALListener &&other)=delete
 
OALListeneroperator= (const OALListener &other)=delete
 
OALListeneroperator= (OALListener &&other)=delete
 

Static Public Member Functions

static cgv::math::fvec< float, 3 > get_position ()
 Gets the listener position.
 
static cgv::math::fvec< float, 3 > get_velocity ()
 Gets the listener velocity.
 
static cgv::math::fmat< float, 3, 2 > get_orientation ()
 Gets the listener orientation.
 
static void set_position (cgv::math::fvec< float, 3 > pos)
 Sets the listener position.
 
static void set_velocity (cgv::math::fvec< float, 3 > vel)
 Sets the listener velocity.
 
static void set_orientation (cgv::math::fvec< float, 3 > at, cgv::math::fvec< float, 3 > up)
 Sets the listener orientation.
 

Detailed Description

This class models the single OpenAL listener.

The OALListener is essentially a singleton class to use the listener model of OpenAL. There are no constructors as there is only one listener in the OpenAL context.

Definition at line 187 of file al_context.h.

Member Function Documentation

◆ get_orientation()

cgv::math::fmat< float, 3, 2 > cgv::audio::OALListener::get_orientation ( )
static

Gets the listener orientation.

Returns
The view vector as first, the up vector as second.

Definition at line 379 of file al_context.cxx.

References cgv::math::fvec< T, N >::data().

◆ get_position()

cgv::math::fvec< float, 3 > cgv::audio::OALListener::get_position ( )
static

Gets the listener position.

Returns
The current position.

Definition at line 365 of file al_context.cxx.

References cgv::math::fvec< T, N >::data().

◆ get_velocity()

cgv::math::fvec< float, 3 > cgv::audio::OALListener::get_velocity ( )
static

Gets the listener velocity.

Returns
The current velocity.

Definition at line 372 of file al_context.cxx.

References cgv::math::fvec< T, N >::data().

◆ set_orientation()

void cgv::audio::OALListener::set_orientation ( cgv::math::fvec< float, 3 >  at,
cgv::math::fvec< float, 3 >  up 
)
static

Sets the listener orientation.

Parameters
[in]atThe new view direction
[in]upThe new up direction

Definition at line 390 of file al_context.cxx.

◆ set_position()

void cgv::audio::OALListener::set_position ( cgv::math::fvec< float, 3 >  pos)
static

Sets the listener position.

Parameters
[in]posThe new position

Definition at line 386 of file al_context.cxx.

References cgv::math::fvec< T, N >::data().

◆ set_velocity()

void cgv::audio::OALListener::set_velocity ( cgv::math::fvec< float, 3 >  vel)
static

Sets the listener velocity.

Parameters
[in]velThe new velocity

Definition at line 388 of file al_context.cxx.

References cgv::math::fvec< T, N >::data().


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